Runs
The sandbox-to-optimizer loop, and the three run types that share it
Three run types share one runner contract, one config format and one validation path:
| Run type | What it does | Guide |
|---|---|---|
| train | optimizes the policy on a task index | Training |
| eval | scores a fixed checkpoint on a held-out set | Evaluation |
| infer | samples the agent without training, to measure difficulty | Rollout Generation |
task index ─▶ [ rollout generation ] ─▶ [ training ] ─▶ [ evaluation ]
difficulty filter checkpoints held-out scoreA run is one .env config copied from a template. It launches by hand or through
the agent plugin; both paths call the same runner and the
same checks.
cp scripts/train/_template.env scripts/train/configs/my_run.env
PREFLIGHT_ONLY=1 bash scripts/train/train.sh scripts/train/configs/my_run.env # validate
bash scripts/train/train.sh scripts/train/configs/my_run.env # launchEach guide is written to the same shape — Prerequisites → Setup → Check → Run → Output → Dashboard → Cleanup — so the page tells you what it needs, what it writes, and which run type reads that output next. Running the Pipeline is the same material in run order, across all three at once.
Startup sequence
A train run comes up in this order: vLLM serves the policy, the in-process proxy fronts it, and verl drives the RL loop while the agent rolls out across tasks in Harbor sandboxes.
- Config: the runner sources
scripts/lib/site.envand your config, applies the model preset, and resolves the scaffold and backend. - Validation: nine classes of fatal assertion. The run stops here on any
✗. - venv: built once by
scripts/setup_env.sh, or reused viaVENV_PATH. - Ray: the cluster comes up and waits for
NNODESnodes to join. - vLLM: verl launches DP × TP replicas. CUDA-graph capture on a 30B MoE (TP=4) is ~10–20 min before the first replica registers.
- In-process proxy: started by the verl agent loop. It advertises a per-session URL per trial (no standalone LiteLLM, no fixed port).
- verl loop: generate rollouts → run trials in Harbor → reward → update →
checkpoint every
SAVE_FREQsteps.
Where to go next
The three run types, each a full walkthrough:
- Training: optimize a policy on a task index
- Evaluation: score a checkpoint on a held-out set
- Rollout Generation: sample without training, to measure difficulty
What applies to a run once it is up:
- Scaling Up: multi-node, fully-async, VeOmni/MoE, partial rollout, R3
- Sandbox Backends: Kubernetes vs Docker sandboxes
- Model Serving: the agent → in-process proxy → vLLM chain and its health checks
- Results & Artifacts: logs, checkpoints, trajectories
- Run Validation: the nine assertion classes every launch runs first
Start single-node
A sync_* template on one 8×GPU host is the minimal-cost configuration. Move to an
async_* template and more machines only when it is no longer sufficient; see
Scaling Up.
Stop cleanly between runs
Between runs, bash scripts/cleanup_before_run.sh stops Ray, frees ports, and
reaps stale vLLM/verl processes. Checkpoints and wandb runs are preserved; set
KEEP_TRIALS=0 to also clear the trials dir. It never kills running GPU tasks.