Skip to content

Cluster Runs

The launchers in notebooks/experiments/scripts/ submit the checked-in Marimo experiments with explicit algorithm flags. They target a shared runner layout where the remote clone is ~/Projects/pltlf and the uv environment is named pltlf; use PROJECT_PREFIX or DEFAULT_VENV when your setup differs.

Start With A Dry Run

From the repository root:

DRY_RUN=1 SUBMIT_DELAY_SECONDS=0 \
  bash notebooks/experiments/scripts/env.sh \
  classic_2 a16 algorithms=ippo_cer,iql_cer num_runs=1

The command prints shell-escaped submissions without sending them. Remove DRY_RUN=1 only after checking the paths, partition, algorithm grouping, and notebook overrides.

Launcher Map

Scope Slurm/GPU Imperial HPC/CPU
One environment env.sh env_hpc.sh
All curated environments all_envs.sh all_envs_hpc.sh
Explicit partial resume, one env_resume.sh env_resume_hpc.sh
Explicit partial resume, all all_envs_resume.sh all_envs_resume_hpc.sh

Additional tools:

  • hyper.sh balances one environment across two Slurm partitions.
  • hyper_cc.sh runs the same capacity split on a CPU partition.
  • vis.sh submits plot-only jobs where an algorithm runs.npy exists.
  • pltlf.sh preserves the historical per-environment partition assignment.

Every script supports --help.

Environments And Algorithms

The curated environment IDs are:

classic_2              capture_2
classic_3              capture_3
own_coin_first_2       sustained_stag_2
safe_harvest_4         role_claim_2

Select algorithms with algorithms= or PLTLF_ALGORITHMS. Supported IDs are:

ippo            ippo_cer            pr2_ippo       pr2_ippo_cer
iql             iql_cer             pr2_iql        pr2_iql_cer
nashq           nashq_cer
hc_ippo         hc_pr2_ippo         hc_iql         hc_pr2_iql
hc_nashq

The implicit suite is CER-first: it selects the five _cer algorithms and the five hc_* baselines. The five matching objective-reward algorithms without CER are reserved for comparisons. Add them with ablations=True, or use all=True to select all 15 algorithms. algorithms= and PLTLF_ALGORITHMS select an exact named subset, but a subset containing a no-CER algorithm must also pass ablations=True. all=True always expands to the complete suite.

Each submitted job receives all 15 run_* values: selected algorithms are true and every other toggle is false. Direct run_* and just_vis arguments are rejected because the launcher owns algorithm isolation and run mode.

Bundles

GPU launchers balance selected algorithms across three jobs by default, or four on the training partition. Override that with bundles=<positive integer>; counts larger than the selection are capped.

HPC launchers default to one CPU-only job per algorithm and accept the same bundles= override. hyper.sh instead uses p1_jobs and p2_jobs, because its job count follows the two partition capacities.

Examples:

bash notebooks/experiments/scripts/all_envs.sh \
  a16 algorithms=ippo,ippo_cer ablations=True bundles=2 num_runs=5

bash notebooks/experiments/scripts/all_envs_hpc.sh \
  cpu72 algorithms=iql,iql_cer ablations=True num_runs=5

After ssh cpucluster, use the Slurm launcher with the CPU runner and the amd48 partition. A bundle count of 15 is capped to the selected algorithm count, giving one job per algorithm-environment pair for both the 10-algorithm default suite and the full 15-algorithm suite:

bash scripts/pltlf/all_envs.sh amd48 bundles=15 num_runs=5

Resume Safety

Training launchers add resume_partial_runs=True unless explicitly disabled. The resume-named wrappers force it on and reject a conflicting override. The runtime reuses only a validated contiguous seed prefix whose config fingerprint, expected seeds, result arrays, manifest, and checkpoint bundles match.

Do not create one scheduler job per seed. Seeds in one algorithm share cumulative arrays and partial_resume_manifest.json; concurrent writers would race. Safe seed fanout requires a future per-seed artifact format and merge step.

Operational Controls

  • DRY_RUN=1: print submissions only.
  • SUBMIT_DELAY_SECONDS=<seconds>: pace submissions.
  • SUBMIT_CMD=<command>: override the scheduler command.
  • JOB_SCRIPT=<path>: override py.sh or py_cpu.sh.
  • PROJECT_PREFIX=<path>: override the remote pltlf project prefix.
  • DEFAULT_VENV=<name>: override the injected uv environment name.
  • PLTLF_VIS_EXPORT_BASE=<path>: change the local artifact root checked by vis.sh.

The concise command reference next to the scripts is notebooks/experiments/scripts/README.md.