Non-Python experiments¶
Summarizes SPEC.md §14; SPEC.md is authoritative.
vouch run¶
$ vouch run cifar_vit_jl --dep src/ --dep configs/vit.yaml --input data/cifar10.npz \
--out results/vit.csv -- julia train.jl --model vit
- Before running, vouch hashes
--deppaths (semantically for.py, by raw content otherwise) and--inputpaths. - It runs the command with
VOUCH_RUN,VOUCH_ROOTandVOUCH_VALUES(a temporary JSON path) set in the environment. - The program writes its values to
$VOUCH_VALUES, either as full records or as shorthand:
{"values": {"cifar.vit.acc": {"value": 0.912, "fmt": ".1pct", "desc": "ViT top-1", "better": "higher"}},
"claims": {}, "artifacts": ["results/vit.png"], "tables": {}}
- On exit 0, vouch hashes
--outpaths and declared artifacts, and writes a run record withcode.granularity = "deps". On a non-zero exit it writes nothing and passes the exit code through. - Python commands. When the command is
python script.py …, vouch runs it aspython -m vouch.exec script.py …. The script gets function-level tracking with no code changes, and its ownvouch.record()/@vouch.trackvalues land in this run. - The recorded command is the whole
vouch run …invocation, so thefix:line for a stale run re-runs it identically. - Existing results files.
vouch run … --values results.jsonreads values from a file the program already writes, instead of$VOUCH_VALUES. It accepts the same shapes asrecord_all(nested JSON, JSONL or CSV, plus--prefix,--row-keyand--stats).
Registering results that already exist: vouch import¶
Results sometimes come from code that has already run: before you adopted
vouch, from a notebook, or from a collaborator's cluster job. vouch import
registers the whole file in one command, with honest, reduced provenance:
$ vouch import results/imagenet_eval.json --run imagenet_eval --prefix imagenet \
--producer experiments/eval_imagenet.py --producer src/models/ \
--command "python experiments/eval_imagenet.py --split val"
imported 24 values into run imagenet_eval (prefix imagenet) · granularity: declared (3 files)
metadata from [metrics]: 24/24 described
note: imported, not recorded live; freshness tracks the declared producer files
- Input shapes: the same as
record_all: JSON (nested), JSONL, CSV (--row-key), and per-seed lists (--stats). - Provenance: the
code.granularityisdeclared: the--producerfiles and directories are hashed semantically, so editing them makes the run stale. The results file itself is recorded as an input. - Honesty in every view:
trace, the CSV, and tooltips all say the values were imported.checkreportsimportedas info, and as a warning when there is no--producer. - Re-running the producer under a normal run replaces the imported record.
See also: vouch run/vouch import.