idun-numerai
Numerai on top of idun: Numerai's data in idun's packed format, walk-forward refits of your choice, the labels, Numerai's scoring functions in NumPy, and model uploads. It ships the tools, not a configuration: every learner's parameters are idun's (the learners' parameters).
pip install idun-numerai # Python 3.12–3.14; idun's Metal backend needs Apple silicon with macOS 15 or later
Train and score
from idun import gbm
from idun.data import PackedDataset
from idun_numerai.data import build_cache
from idun_numerai.download import download
from idun_numerai.score import corr, per_era
download("v6") # Numerai's v6 training and validation files and the feature list (public data, no credentials)
# Streamed into a memory-mapped packed dataset (never the whole panel in memory): one target, and walk-forward
# windows that train on every era up to `purge` eras before each date and predict from it until the next.
build_cache("v6", "cache", seed=0, target="target", refit_dates=("2020-01-03", "2023-01-06"), purge=12)
data = PackedDataset.open("cache", binning="r1") # the second window's binning, fitted on its training rows
window = data.refits[1]
params = gbm.Params(num_trees=300, learning_rate=0.05, feature_fraction=0.25) # an illustration, not a tuned setting
model = gbm.train(params, data, rows=slice(0, window.train_hi), backend="metal")
rows = slice(window.pred_lo, window.pred_hi)
scores = per_era(corr, data.era[rows], model.predict(data, rows=rows, backend="metal"), data.target[rows])
idun_numerai.download,idun_numerai.data.build_cache: the data, checked and packed (4-bit codes, the named factors binned per window, the country as a categorical column).idun_numerai.refits: the walk-forward windows (training rows, a purge, the predicted rows) for the dates and purge you give.idun_numerai.inputs: the labels: classesrint(4 · y)for the networks' classification, per-era z for regression.idun_numerai.score: Numerai's per-era scores (corr,ncorr,per_era) in NumPy and SciPy, asnumerai-toolsdefines them (checked against it per era in the tests;numerai-toolsis not a dependency).
The target, the refit dates and the purge are arguments of build_cache and refit_table, without defaults.
Model uploads
Numerai's model uploads run a pickled predict(live_features, live_benchmark_models) on its servers, where idun is not
installed. idun_numerai.upload carries trained models as arrays and predicts with NumPy alone:
from idun_numerai import upload
predict = upload.predictor([model, [tabm_s0, tabm_s1], realmlp], data, weights=[2, 1, 1])
upload.save(predict, "model.pkl") # run under Python 3.12, the runtime's
idun_gbm's upload predictions equal Booster.predict's bit for bit; TabM's and RealMLP's are their float64 reference
backend's. A list is a bag (its mean); several entries are blended by rank.
Licence
Apache-2.0.
Metadata
Release files for idun-numerai 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| idun_numerai-2.0.1.tar.gz | 23.0 kB | Without provenance | Details for idun_numerai-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idun_numerai-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for idun_numerai-2.0.1-py3-none-any.whl |
Total release size: 50.5 kB
Release files / idun_numerai-2.0.1.tar.gz
| Download URL | idun_numerai-2.0.1.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9780dca3451796b3b311648978721eca422c2a2953f81593a0a83cb26ab396c2
|
|
BLAKE2b-256 checksum How to use checksums |
9783c621ffac4d29dbc06c205db18cac9a0f1836b4da1f30cdef13b58e14e4e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / idun_numerai-2.0.1-py3-none-any.whl
| Download URL | idun_numerai-2.0.1-py3-none-any.whl |
|---|---|
| Size | 27.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5307a130bb80d8d2ce6513f9823b8f51750484e23b8e66114a4619b48b16afc
|
|
BLAKE2b-256 checksum How to use checksums |
0e34cb4f58d75c75b600025b68352a9bf4f8d1dbe894bb6479ea242fc99a0c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for idun-numerai 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.