Registry / ai-ml / numerapi

numerapi

JSON →
library2.23.2pypypi✓ verified 84d ago

Python client for the Numerai machine learning competition. Automates data download, prediction upload, staking, and account management. Current version 2.23.2, released monthly.

pip install numerapi
INSTALL
IMPORT
SIG · NUMERAPI
N
numerapi
ai-mlpythonv2.23.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

NumerAPI
from numerapi import NumerAPI
import numerapi
NumerAPI is the main class, not a module.

Initialize NumerAPI and download the latest training data.

from numerapi import NumerAPI napi = NumerAPI() # download current dataset napi.download_current_dataset('training_data.parquet', dest_path='./')
Debug
Known issues
breakingThe `sign` method from v1 was removed. Use `napi.upload_predictions()` with `model_id` parameter.
fix
Use `napi.upload_predictions('path/to/predictions.csv', model_id='your_model_id')`.
affects: >=2.0.0
gotchaThe `download_dataset` method returns a path string, not a file object. Many users expect a file handle.
fix
Store the returned path and use it for reading: path = napi.download_dataset('filename'); data = pd.read_parquet(path).
affects: all
gotchaAPI keys must be set via environment variables `NUMERAI_PUBLIC_ID` and `NUMERAI_SECRET_KEY` or passed directly to constructor. Not using environment variables leads to authentication errors in production.
fix
Set environment variables before creating NumerAPI: os.environ['NUMERAI_PUBLIC_ID'] = '...'.
affects: all
Errors
Common errors & fixes
NumerAPIError: 401 - Unauthorized
Missing or invalid API credentials (public_id/secret_key).
fix
Set NUMERAI_PUBLIC_ID and NUMERAI_SECRET_KEY environment variables or pass them to NumerAPI() constructor.
ValueError: No model_id provided and no default model set
Calling upload_predictions without specifying model_id when no default is configured.
fix
Provide model_id parameter: napi.upload_predictions('preds.csv', model_id='your_model_id').
FileNotFoundError: [Errno 2] No such file or directory: 'numerai_training_data.parquet'
Download path not correctly specified; napi.download_dataset returns the path, but user tries to use a hardcoded name.
fix
Use the returned path: path = napi.download_dataset('numerai_training_data.parquet', dest_path='./'); data = pd.read_parquet(path).
Upgrade
Version history
2.23.2latest on PyPI · released Jun 2, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
python-dateutilrequiredDate parsing
Agent activity
9 hits · last 30 days
node
8
Resources
numerapi — pip install numerapi · libregistry