Reproduce the study
Use the commands below to repeat the experiment, check the saved results, or run the lesson examples.
Run the experiment
Start from a fresh checkout without an existing freeze record or
final test run. You need uv, Typst, and
ffmpeg. The first command installs the recorded Python
dependencies. Training requires the device specified in the
experiment contract.
uv sync --frozen
uv run gr smoke --config configs/pilot.yaml
uv run gr make-manifests --config configs/pilot.yaml
uv run gr preflight --config configs/pilot.yaml
uv run gr freeze --config configs/pilot.yaml
for b in B00 B01 B02 B03 B04 B05; do
uv run gr run-bundle --contract configs/experiment_contract.yaml --bundle $b
done
uv run gr integrity --contract configs/experiment_contract.yaml --phase preopen
uv run gr evaluate-final --contract configs/experiment_contract.yaml
uv run gr analyze --contract configs/experiment_contract.yaml
uv run gr audit --contract configs/experiment_contract.yaml
uv run grf study-extras
uv run gr integrity --contract configs/experiment_contract.yaml --phase release
uv run gr media --contract configs/experiment_contract.yaml
uv run gr publish-result --contract configs/experiment_contract.yaml
uv run gr export-typst --contract configs/experiment_contract.yaml
typst compile report/main.typ build/recovery-policy-learning-report.pdf
To reproduce the run exactly, use the recorded device and package
versions in uv.lock. Compile the report before
preparing the website assets.
Check an existing result
This command recalculates the published summary from the saved evaluation rows and checks that they agree. It does not run the final test again.
uv run gr integrity --contract configs/experiment_contract.yaml --phase release
Run the teaching labs
The lessons use separate experiments and random seeds. Their results explain the concepts; the study report covers the main experiment.
uv run grf run all # seven labs; figures, tables, mini-reports
uv run grf media # rollout videos + scrubber trajectories
uv run grf network-trace # real weights/activations for the network view
uv run pytest -m "not slow"
Preview the website locally
pnpm go # stage, build, check, and serve on localhost:4173
To edit the site with live updates:
uv run grf stage-site --force
uv run grf verify-staging
cd site
npm ci
npm run dev
Staging copies the figures, data, videos, and report into
site/public. It records their source fingerprints.
Regenerate data and figures from their source commands when changing
them.
Which code produced the results?
configs/freeze_record.json identifies the code used for
the study. The lessons, website, videos, and additional analyses
were added later. The original protocol, trained models, and
evaluation records remain the source of the reported result. The
report records these versions in detail.