Repository navigation
Conversation
A benchmark is a directory with a benchmark.yaml naming a dataset, its checksum, the backtest parameters and the evaluated org units. chap benchmark init creates one, chap benchmark run evaluates a model on it and adds the evaluation to evaluations.jsonl, and chap benchmark show lists the registered evaluations with their main metrics. A run stops before the model starts when the dataset has changed since the benchmark was created.
The bootstrap estimate and the scoring per split point now live in chap_core.assessment.selection_bias, with no database dependency, so it can be used on evaluations read from files. The service keeps reading the candidates and the baseline of a stored specification and building the API response. origin_periods moves to flat_representations, since both the estimate and the prediction monitoring service use it.
chap benchmark selection-bias compares the newest evaluation of each model on a benchmark with a baseline model evaluated on it, and estimates how much of the best model's lead is luck, with the same bootstrap over the split points as the REST endpoint for backtest specifications.
|
Tried this out locally on One suggestion on ergonomics: could Chap projects already work this way: What I have in mind:
One thing to watch in Minor: the |
Summary
Adds
chap benchmark, a CLI command for comparing several models under one evaluation setup. A benchmark is a directory whosebenchmark.yamlfixes a dataset (with its checksum), the backtest parameters and the evaluated org units, so every model evaluated on it is scored on the same forecasts.chap benchmark initcreates a benchmark after checking that the dataset can be evaluated with the backtest parameters.chap benchmark runevaluates a model on it aschap evaldoes, writes a NetCDF file toevaluations/and adds a line toevaluations.jsonl. It stops before running the model if the dataset file has changed since the benchmark was created.chap benchmark showlists the registered evaluations with their main metrics.chap benchmark selection-biasestimates how much of the best model's lead over a baseline is luck, with the same bootstrap over split points as the REST endpoint for backtest specifications.To make the last one possible, the bootstrap estimate and the scoring per split point move from
selection_bias_servicetochap_core.assessment.selection_bias, with no database dependency. The service keeps reading the candidates and baseline of a stored specification and building the API response.origin_periodsmoves toflat_representations, since both the estimate and the prediction monitoring service use it.Documented in
docs/chap-cli/benchmarks.md.Review needed
Review needed: full
Test plan
make test: 2926 passed, 95 skipped. New tests intests/cli_endpoints/test_benchmark_cli.py.ruff check,mypy,pyrightand the alembic head check pass.