This document explains how to evaluate models on ChainBench-ADD using the unified pipeline in chainbench/eval/.
The evaluation pipeline is metadata-driven. Its main required inputs are:
- final packaged metadata, usually
data/ChainBench/metadata.csv - final dataset root, usually
data/ChainBench - baseline repos and baseline-specific conda environments
config/eval.json
The orchestrator uses the metadata to derive task packs and then builds baseline-specific views from those packs.
The pipeline exposes five task IDs:
| Task ID | What it measures | Test construction |
|---|---|---|
in_chain_detection |
bona fide vs spoof discrimination within a delivery family | family-specific train/dev/test rows |
operator_substitution |
robustness to swapping operator identity under matched context | matched same-label pairs |
parameter_perturbation |
robustness to parameter changes within one operator slot | matched same-label pairs |
order_swap |
robustness to adjacent minimal order swaps | matched same-label pairs |
delivery_robustness |
robustness along observed lineage graphs as edits accumulate | test rows grouped by (parent_id, chain_family, label) |
These tasks are built from Stage 5 metadata annotations, not from hand-written split files.
config/eval.json registers five baselines:
aasistaasist-lsls_dfsafeearnes2net
Each baseline entry defines:
repo_pathconda_envtrainconfigevalconfig- optional
assets - adapter/runtime config
The orchestrator is unified, but the actual model/runtime code still comes from the external baseline repos.
Before you run evaluation, make sure:
- the baseline submodules are initialized
- all baseline conda envs exist
- model assets referenced in
config/eval.jsonare present - the final dataset exists at
dataset_root metadata_pathpoints to the packaged Stage 5 metadata
Example submodule/bootstrap step:
git submodule update --init --recursivechainbench eval --config config/eval.jsonThis command:
- loads the metadata
- builds task packs
- schedules baseline runs across configured devices
- prepares baseline-specific views
- trains and/or evaluates each baseline
- normalizes scores to
scores.csv - computes task metrics
- writes per-run metrics and an overall eval summary
Build task packs and report counts without training/evaluating anything.
chainbench eval --config config/eval.json --dry-runReuse existing checkpoints and only score/evaluate.
chainbench eval --config config/eval.json --eval-onlyTrain runs without final evaluation.
chainbench eval --config config/eval.json --train-onlychainbench eval --config config/eval.json --tasks in_chain_detection
chainbench eval --config config/eval.json --tasks operator_substitution parameter_perturbationchainbench eval --config config/eval.json --baselines nes2net sls_dfchainbench eval --config config/eval.json --sample-ratio 0.1Ignore cached checkpoints.
chainbench eval --config config/eval.json --force-retrainYou can specify the sampling ratio for each task and split by sample_ratio in config/eval.json. It can be provided in several ways.
Apply the same ratio to every task and split.
"sample_ratio": 0.1"sample_ratio": [
[1.0, 1.0, 1.0],
[0.1, 0.1, 1.0],
[0.1, 0.1, 1.0],
[0.1, 0.1, 1.0],
[1.0, 1.0, 1.0]
]By default the pipeline writes to outputs/eval/.
A typical run produces:
outputs/eval/
<task_id>/
<variant>/
<baseline>/
train.log
eval.log
scores.csv
metrics.json
checkpoints/...
eval_summary_<timestamp>.json
The run directory pattern is:
<output_root>/<task_id>/<variant>/<baseline>/
chainbench eval --config config/eval.json --dry-run
chainbench eval --config config/eval.jsonchainbench eval --config config/eval.json \
--tasks operator_substitution parameter_perturbation order_swapAt a high level you need to:
- add the repo under
baselines/ - create its runtime/adapter wrapper under
chainbench/eval/ - register the baseline in
config/eval.json - make sure it outputs scores that the normalization path can ingest
The current pipeline is already structured around baseline runners, prepared views, and normalized score files, so new baselines plug in most cleanly by following the existing runner pattern.