Skip to content

Commit 6c95723

Browse files
ScavieFaeclaude
andcommitted
Runbook: experiment framework ops + SSH launching lessons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8ad4e15 commit 6c95723

1 file changed

Lines changed: 82 additions & 1 deletion

File tree

worldmodel/RUNBOOK.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,88 @@ The v2.2 jump is entirely from input conditioning — same data, same machine, s
353353

354354
**Overnight runs (launched Feb 23, 2026):**
355355
- Scav: v2.2 world model, 22K games, 10 epochs
356-
- ScavieFae: imitation policy, 4K games, 50 epochs
356+
- ScavieFae: imitation policy, 4K games, 50 epochs (converged at epoch 26 — btn_acc=0.992, val plateau)
357+
358+
## Experiment Framework
359+
360+
Config-driven experiments. Each experiment is a self-contained YAML file in `worldmodel/experiments/`. No code changes to switch — just `--config`.
361+
362+
### How it works
363+
364+
```bash
365+
# Run an experiment:
366+
.venv/bin/python -m worldmodel.scripts.train \
367+
--config worldmodel/experiments/exp-2a-press-events.yaml \
368+
--dataset ~/claude-projects/nojohns-training/data/parsed-v2 \
369+
--streaming --buffer-size 500 --device mps -v
370+
```
371+
372+
The experiment name (filename minus `.yaml`) auto-drives:
373+
- **wandb run name** (unless `--run-name` overrides)
374+
- **checkpoint directory**: `{save_dir}/{experiment_name}/`
375+
376+
### Feature flags (EncodingConfig)
377+
378+
Two flags control tensor dimensions at config time:
379+
380+
| Flag | Effect | Dims changed |
381+
|------|--------|-------------|
382+
| `state_age_as_embed: true` | Learned embedding (vocab=150, dim=8) replaces scaled float | float_per_player: 29→28, int_per_frame: 15→17, embed_dim: 60→68 |
383+
| `press_events: true` | 16 binary rising-edge features appended to next_ctrl | ctrl_conditioning_dim: 26→42 |
384+
385+
When both are false (default), behavior is identical to v2.2. No existing runs break.
386+
387+
### Current experiments
388+
389+
```
390+
worldmodel/experiments/
391+
├── baseline-v22.yaml # v2.2 control (all flags off)
392+
├── exp-1a-state-age-embed.yaml # state_age as integer embedding
393+
└── exp-2a-press-events.yaml # button press events in next_ctrl
394+
```
395+
396+
All are 2K games, 2 epochs, batch_size 512 — quick directional runs.
397+
398+
### Running experiments on ScavieFae
399+
400+
MPS doesn't share between processes. Only one training run per machine.
401+
402+
**DO NOT** launch via inline `nohup ... &` over SSH — if the command fails partway through, the backgrounded process still spawns. Three botched PID-capture attempts = three zombie training runs fighting over MPS. Use a script instead:
403+
404+
```bash
405+
# Write a launcher script, scp it over, then run it
406+
scp launch-exp.sh queenmab@100.93.8.111:~/launch-exp.sh
407+
ssh queenmab@100.93.8.111 "nohup ~/launch-exp.sh > ~/exp.log 2>&1 & echo PID=\$!"
408+
```
409+
410+
**Chaining experiments** (wait for one to finish, then start the next):
411+
412+
```bash
413+
#!/bin/bash
414+
# run-after-prev.sh — wait for PID, then launch
415+
echo "[$(date)] Waiting for PID $1 to finish..."
416+
while kill -0 $1 2>/dev/null; do sleep 60; done
417+
echo "[$(date)] Done. Launching next experiment..."
418+
cd ~/claude-projects/nojohns
419+
.venv/bin/python -m worldmodel.scripts.train --config $2 \
420+
--dataset ~/claude-projects/nojohns-training/data/parsed-v2 \
421+
--streaming --buffer-size 500 --device mps -v
422+
```
423+
424+
### Monitoring
425+
426+
```bash
427+
# Check exp-2a progress:
428+
ssh queenmab@100.93.8.111 "tail -5 ~/claude-projects/nojohns-training/exp-2a.log"
429+
430+
# Check queued exp-1a:
431+
ssh queenmab@100.93.8.111 "tail -5 ~/claude-projects/nojohns-training/exp-1a-queue.log"
432+
433+
# exp-1a training log (once it starts):
434+
ssh queenmab@100.93.8.111 "tail -5 ~/claude-projects/nojohns-training/exp-1a.log"
435+
436+
# Or just check wandb — both log there automatically
437+
```
357438

358439
## Dependencies
359440

0 commit comments

Comments
 (0)