custom_miner — the generator you submit
A cascade DataGenerator (generator.Generator) that turns one integer seed
into a corpus of univariate float series. The subnet holds the model, seeds, and
compute identical between king and challenger, so the only thing that moves
your score is the distribution this generator emits.
The idea: compete on prior diversity + realism
The reference/genesis generators win by covering the shapes a forecaster must handle. This one mixes 10 process families, each fully seed-deterministic and vectorised:
| family | what it contributes |
|---|---|
trend_seasonal_ar |
level + slope + multi-seasonal sinusoids + AR(1) noise |
regime_shift |
piecewise level & variance regimes (structural breaks) |
multiplicative |
positive level × seasonal factor × multiplicative noise |
ar2 |
AR(2), stationarity-guaranteed (Levinson-Durbin), incl. near-unit-root |
integrated |
I(1)/I(2) random walks with drift |
threshold_ar |
SETAR — regime-switching nonlinear recurrence |
chaotic |
bounded chaotic maps (logistic / sine) |
rff_gp |
smooth GP-like samples via random Fourier features |
intermittent |
zero-inflated / intermittent demand |
pulse_outlier |
smooth base + sparse pulses/outliers + flat gaps |
The mixture weights (family_weights in config.json) were tuned
with local_validator against a broad multi-domain eval: strong seasonal
coverage matters (most real series are seasonal) while every family keeps
meaningful mass so the prior generalises across non-seasonal domains too.
Contract compliance (what cascade verify checks)
- Determinism — every value comes from one
np.random.default_rng(seed)in a fixed draw order → byte-identical corpus at a fixed seed (the property the trainer audits by building twice). - Code-only — no shipped weights, no network, no clock; imports are numpy +
cascade.interfaceonly (on the allowlist, clear of the static-guard blocklist). - Bounded + finite — 1-D float64 series, length in
[min_length, max_length], finite;_sanitizeis the hard backstop. - Fast — vectorised per family (a batched time-axis recurrence, never a
per-series Python loop), so draining the full
corpus_n_series(16384) stays well undermax_generate_seconds.
Verify it yourself:
python -m cascade.miner.cli verify custom/custom_miner
# OK: generator would be accepted by the trainer.
# corpus_digest (seed=0): 8ecf44e7ebbb601f… [deterministic]
How to make it yours
- Tune the mixture — edit
family_weightsinconfig.json(no code change), then re-runpython -m custom.local_validatorand watch the LCB / per-domain win-rate move. This is the cheapest, safest lever. - Add/replace a family — add a
_yourfamily(rng, n, L) -> (n, L)builder, register it in_FAMILIES/_DEFAULT_WEIGHTS/ thebuilderstuple. Keep it vectorised and seed-deterministic;_sanitizeguarantees finiteness. - Re-verify + re-A/B every change:
verifymust stay green and you want the local KOTH verdict trending up before you deploy.
Files
custom_miner/
generator.py class Generator(DataGenerator) — the mixture-of-priors
config.json name/description, length band, family_weights
requirements.txt hash-locked deps (numpy only). The trainer only FORMAT-checks
this file (it does not reinstall — the sandbox ships the
allowlisted stack), so the placeholder zero-hash is accepted,
as in the shipped reference generators. Real hashes optional.