Skip to content

Notebooks

The project uses marimo notebooks for environment previews, experiment runs, and visualization.

Environment notebooks live under notebooks/environments. They are useful for checking mechanics and labels before running training. Experiment notebooks live under notebooks/experiments and contain the main benchmark configurations.

Common Commands

Open the local obligation browser:

uv run marimo edit notebooks/local_obligations_mo.py

Open an experiment notebook:

uv run marimo edit notebooks/experiments/cooking_zoo_mo.py

Run a notebook from the command line with overrides:

uv run python notebooks/experiments/cooking_zoo_mo.py \
  --total-timesteps 600000 \
  --run-contract-ippo true \
  --run-contract-iql true

The CLI override helper accepts case-insensitive option names and rejects unknown flags so experiment configuration mistakes fail early.

What To Inspect

For contract experiments, inspect:

  • the printed formula and environment kwargs,
  • the serialized contract_library,
  • contract_events,
  • reward and safety plots,
  • exported .np metric files under exports/.

The active file in many workflows is an experiment notebook such as notebooks/experiments/cooking_zoo_mo.py. That notebook builds the environment, the safety model, ordinary shield templates, and the certified library before training.