OGbench / docs /HANDOFF_ogmaze_baseline_inference.md
assa8945's picture
Upload docs/HANDOFF_ogmaze_baseline_inference.md with huggingface_hub
dff40cd verified
|
Raw History Blame Contribute Delete
16.1 kB
# Handoff: OGMaze baseline inference (LeWM, RC-aux, adajepa, dino_wm)
Last updated 2026-10-07. Box: 4×H100 80GB. GPU 0 belongs to another user (always full).
Only use GPUs the user has explicitly granted for this task. Rendering for GPU-3 jobs
goes to GPU 2 (GPU 3's EGL device hangs), see "Gotchas".
## 1. Layout
| Item | Path |
|---|---|
| Python env (all four models) | `/data/xinyuan/anaconda3/envs/lewm/bin/python` |
| Eval + launcher scripts | `/data/xinyuan/xr/model/world/le-wm/claude_workspace/sh_script/` |
| Helper python | `/data/xinyuan/xr/model/world/le-wm/claude_workspace/python_script/` |
| All run logs | `/data/xinyuan/xr/model/world/le-wm/claude_workspace/log/` |
| Datasets (h5, do NOT modify) | `/data/xinyuan/xr/model/world/le-wm/datasets/pointmaze/ogmaze_{medium,large,giant}_navigate_chiyao_checkerboard_224.h5` |
| adajepa converted data | `/data/xinyuan/xr/model/world/adajepa/data/ogmaze_{medium,large,giant}/` |
| dino_wm converted data | `/data/xinyuan/xr/model/world/dino_wm/data/ogmaze_{medium,large,giant}/` |
| HF cache | `HF_HOME=/data/hf_cache` |
Repos:
- LeWM: `/data/xinyuan/xr/model/world/le-wm`
- RC-aux: `/data/xinyuan/xr/model/world/RC-aux`
- adajepa: `/data/xinyuan/xr/model/world/adajepa`
- dino_wm: `/data/xinyuan/xr/model/world/dino_wm`
## 2. Checkpoints (epoch 20, frameskip 10, 224px checkerboard)
| Model | Path |
|---|---|
| LeWM | `le-wm/checkpoints/lewm_ogmaze_{medium,large,giant}_2gpu_b768x2_fs10_20ep_<date>/weights_epoch_20_object.ckpt` (medium: use `20260831_014818`; `20260830_144311` is an abandoned run; the eval script auto-picks the newest complete one) |
| RC-aux | `RC-aux/checkpoints/rcaux_ogmaze_{maze}_2gpu_b384x2_fs10_20ep_<date>/<run>_epoch_20_object.ckpt` |
| adajepa | `adajepa/checkpoints_ogmaze/test/ogmaze_{maze}_False_agg32_projnone_dim384_hw14_sgTrue_lr1e-05/checkpoints/model_latest.pth` |
| dino_wm | `dino_wm/checkpoints_ogmaze/outputs/<date>/<time>/checkpoints/model_20.pth` (hydra-timestamped; the eval script finds the newest dir whose `.hydra/config.yaml` has `name: ogmaze_<maze>` and a `model_20.pth`. Current: medium `2026-09-07/10-49-19`, large `2026-09-07/10-59-12`, giant `2026-09-09/14-54-41`) |
## 3. Protocol
- 50 evaluations per cell, goals replayed from the dataset (`goal_source=dset` / `eval.dataset_name`), action block 10 (= frameskip).
- Cells are `maze:budget:offset` with budget = 3×offset:
original grid 150/50, 300/100, 450/150; extended 750/250, 1500/500, 3000/1000.
- LeWM/RC-aux: `eval_budget`, `goal_offset_steps` are raw env steps. Default seed 42.
- adajepa: `goal_H = offset` (raw steps; it divides by frameskip itself), `max_iter = budget/10`, `n_taken_actions=10`. Frozen mode (`ADAPT=0`) for comparability.
- dino_wm: `goal_H = offset/10` (in FRAMES), `max_iter=3` fixed. Getting this wrong gives goals 10× too far.
## 4. Running one cell
All scripts take `MAZE BUDGET OFFSET GPU` as env vars and print `[eval] ... DONE rc=`.
```bash
cd /data/xinyuan/xr/model/world/le-wm/claude_workspace/sh_script
# LeWM (SEED=42 default; TAG_SUFFIX to keep runs separate, e.g. _seed43)
MAZE=medium BUDGET=150 OFFSET=50 GPU=2 SOLVER_BATCH=1 EPOCH=20 bash eval_lewm_ogmaze.sh
# RC-aux
MAZE=medium BUDGET=150 OFFSET=50 GPU=2 SOLVER_BATCH=1 EPOCH=20 bash eval_rcaux_ogmaze.sh
# adajepa (single process, 50 samples sequential, slow; prefer sharded launcher below)
MAZE=medium BUDGET=150 OFFSET=50 GPU=2 bash eval_adajepa_ogmaze.sh
# dino_wm (one process batches all 50 envs; ~37 GB at 150/50, up to 94 GB at 3000/1000)
MAZE=medium BUDGET=150 OFFSET=50 GPU=2 EPOCH=20 bash eval_dinowm_ogmaze.sh
```
Timing per cell (approx): LeWM/RC-aux 10 min–3 h depending on budget (SOLVER_BATCH=1, 50 sequential
episodes; many cells run concurrently per GPU, ~1–2 GB each). adajepa ~9 GB/sample-shard, 63–70 s per
CEM iter under load. dino_wm: 150/50 ≈ 1.7 h (fast config) / 4 h (fp32 exact); 750/250 ≈ 9–10 h;
1500/500 ≈ 18 h; 3000/1000 ≈ 36 h.
## 5. Grid launchers (bounded concurrency, GPU round-robin)
```bash
cd /data/xinyuan/xr/model/world/le-wm/claude_workspace/sh_script
CELLS="medium:150:50 medium:300:100 medium:450:150 large:150:50 ..." # maze:budget:offset
# LeWM extended cells -> log/lewm_ext_<cell>.log, summary lines "[lewm] ... sr="
GPUS="1 2" MAXJOBS=4 nohup bash lewm_ext_parallel.sh $CELLS > ../log/lewm_ext_parallel.log 2>&1 &
# LeWM with another seed (results tagged _seed<SEED>) -> log/lewm_seed<SEED>.log
SEED=43 GPUS="3" MAXJOBS=3 nohup bash lewm_seed_parallel.sh $CELLS > ../log/lewm_seed43.log 2>&1 &
# RC-aux extended
GPUS="1 2" MAXJOBS=4 nohup bash rcaux_ext_parallel.sh $CELLS > ../log/rcaux_ext_parallel.log 2>&1 &
# adajepa: exact data parallelism, one process per sample (SHARD=a:a+1, PSEED=1),
# global cap on live pythons, VRAM guard, retries, auto-merge. Summary "[adajepa-merged] ... success_rate="
GPUS="1 2" MAXJOBS=26 nohup bash adajepa_shard_launcher2.sh $CELLS >> ../log/adajepa_sharded_grid.log 2>&1 &
# manual merge of shards:
/data/xinyuan/anaconda3/envs/lewm/bin/python ../python_script/adajepa_merge_shards.py \
/data/xinyuan/xr/model/world/adajepa/eval_outputs/ogmaze/medium_b150_o50_frozen_pseed_shard*-*
# dino_wm: one process per cell, snapshot of eval script, .running/.done markers in log/.
# Summary lines "[dinowm-ext] <maze> b<B> o<O> rc= gpu= sr="
GPUS="1 2" MAXJOBS=2 nohup bash dinowm_ext_launcher.sh $CELLS >> ../log/dinowm_ext_grid.log 2>&1 &
```
dino_wm launcher knobs (env): `EVAL_EVERY=30` (evaluate only at last CEM step, 1.3× faster, flips ~5/50
samples vs upstream `1`), `TF32 CACHE PREALLOC CHUNK` (defaults 0/0/0/1 = exact fp32). The extended grid
was run with defaults + EVAL_EVERY=30 + RENDER_EVERY=10.
## 6. Where the finished results are
### One file with everything
`/data/xinyuan/xr/model/world/le-wm/claude_workspace/csv/ogmaze_results_all.csv`
(columns: model, seed, maze, budget, goal_offset, success_rate, source path). Regenerate it from the
ground-truth files with
`/data/xinyuan/anaconda3/envs/lewm/bin/python claude_workspace/python_script/collect_ogmaze_results.py`.
Also uploaded to HuggingFace (see section 9).
### Ground-truth result files per model
- LeWM: `le-wm/checkpoints/<run>/lewm_<maze>_b<B>_o<O>_epoch20[_seed<S>]_results.txt` (`'success_rate': <percent>`)
- RC-aux: `RC-aux/eval_cache/<maze>/ogmaze-<maze>/rcaux_<maze>_b<B>_o<O>_epoch20[_seed<S>]_results.txt`
- adajepa: `adajepa/eval_outputs/ogmaze/<maze>_b<B>_o<O>_frozen[_pseed_seed<S>_shard<a>-<b>]/per_iter_logs.json`
(seed 100 = config default: base cells unsharded `_frozen`, extended cells 50 shards; seeds 43-46: 50 shards each;
merge with `python_script/adajepa_merge_shards.py DIR...`). **Archived as `adajepa_ogmaze_eval_results.zip` on HF
because the adajepa folder is scheduled for deletion.**
- dino_wm: `dino_wm/eval_outputs/ogmaze/<maze>_b<B>_o<O>_epoch20[_seed<S>]/logs.json`, last record key
`final_eval/success_rate` (the launcher logs print it as `Success rate:`).
### Summary logs (`le-wm/claude_workspace/log/`)
`lewm_*`, `rcaux_ext_seeds_gpu{0,1,2}.log`, `rcaux_seeds.log`, `adajepa_sharded_grid.log`, `adajepa_seeds_grid.log`,
`adajepa_ext_seeds_gpu{0,1,2}.log`, `dinowm_ext_grid.log`, `dinowm_seed_grid.log`.
### Protocol notes per model
- Seed column: LeWM/RC-aux default seed 42. adajepa default seed 100 and dino_wm default seed 99 (both use eval seeds
seed*n+1, so sample 0 is identical across seeds); the CSV labels dino_wm's default-seed runs as seed 42 because their
file names carry no seed suffix.
- adajepa seed 100 extended cells: fp32 until 2026-09-12 19:11, TF32+cached-latent afterwards. adajepa seeds 43/44
extended: TF32+cached-latent+prealloc throughout. All adajepa base cells: exact fp32. Measured effect: ~2/50 sample flips.
- dino_wm seed 42 (all cells) exact fp32 with eval_every=1 for base cells and eval_every=30 for extended cells;
dino_wm seeds 43/44: fast bundle (TF32+cache+prealloc+eval_every=30), ~4-6/50 sample flips, within the 3/50 run-to-run
noise of the exact protocol.
- adajepa checkpoints saw the eval episodes during training (val leak), so its medium numbers are optimistic.
### Mean success rate over seeds (number of seeds in parentheses)
**LeWM**
| | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| medium | 0.28 (5) | 0.26 (5) | 0.22 (5) | 0.25 (5) | 0.26 (5) | 0.15 (5) |
| large | 0.29 (5) | 0.21 (5) | 0.24 (5) | 0.23 (5) | 0.21 (5) | 0.11 (5) |
| giant | 0.18 (5) | 0.13 (5) | 0.13 (5) | 0.11 (5) | 0.09 (5) | 0.10 (5) |
**RC-aux**
| | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| medium | 0.20 (5) | 0.18 (5) | 0.20 (5) | 0.20 (5) | 0.21 (5) | 0.14 (5) |
| large | 0.28 (5) | 0.21 (5) | 0.25 (5) | 0.23 (5) | 0.19 (5) | 0.13 (5) |
| giant | 0.23 (5) | 0.16 (5) | 0.12 (5) | 0.14 (5) | 0.07 (5) | 0.09 (5) |
**adajepa**
| | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| medium | 0.53 (5) | 0.39 (5) | 0.36 (5) | 0.47 (3) | 0.41 (3) | 0.26 (3) |
| large | 0.10 (5) | 0.06 (5) | 0.09 (5) | 0.09 (3) | 0.04 (3) | 0.07 (3) |
| giant | 0.12 (5) | 0.11 (5) | 0.06 (5) | 0.05 (3) | 0.03 (3) | 0.03 (3) |
**dino_wm**
| | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| medium | 0.73 (3) | 0.60 (2) | 0.67 (2) | 0.62 (1) | 0.46 (1) | 0.54 (1) |
| large | 0.21 (3) | 0.09 (2) | 0.09 (2) | 0.06 (1) | 0.08 (1) | 0.08 (1) |
| giant | 0.29 (3) | 0.21 (2) | 0.15 (2) | 0.06 (1) | 0.02 (1) | 0.10 (1) |
### Per-seed success rates
**LeWM**
| seed | maze | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| 42 | medium | 0.28 | 0.22 | 0.16 | 0.32 | 0.28 | 0.22 |
| 42 | large | 0.30 | 0.24 | 0.22 | 0.26 | 0.20 | 0.10 |
| 42 | giant | 0.14 | 0.08 | 0.12 | 0.08 | 0.10 | 0.06 |
| 43 | medium | 0.26 | 0.24 | 0.22 | 0.20 | 0.24 | 0.12 |
| 43 | large | 0.34 | 0.26 | 0.36 | 0.26 | 0.28 | 0.06 |
| 43 | giant | 0.26 | 0.18 | 0.18 | 0.16 | 0.06 | 0.08 |
| 44 | medium | 0.24 | 0.28 | 0.22 | 0.30 | 0.30 | 0.06 |
| 44 | large | 0.22 | 0.12 | 0.14 | 0.22 | 0.14 | 0.10 |
| 44 | giant | 0.18 | 0.14 | 0.12 | 0.12 | 0.14 | 0.10 |
| 45 | medium | 0.24 | 0.18 | 0.16 | 0.22 | 0.20 | 0.16 |
| 45 | large | 0.32 | 0.14 | 0.22 | 0.26 | 0.20 | 0.16 |
| 45 | giant | 0.20 | 0.18 | 0.18 | 0.16 | 0.16 | 0.16 |
| 46 | medium | 0.36 | 0.36 | 0.32 | 0.20 | 0.30 | 0.18 |
| 46 | large | 0.28 | 0.28 | 0.24 | 0.14 | 0.24 | 0.12 |
| 46 | giant | 0.14 | 0.06 | 0.06 | 0.02 | 0.00 | 0.12 |
**RC-aux**
| seed | maze | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| 42 | medium | 0.18 | 0.20 | 0.16 | 0.22 | 0.24 | 0.18 |
| 42 | large | 0.34 | 0.18 | 0.28 | 0.24 | 0.16 | 0.08 |
| 42 | giant | 0.16 | 0.10 | 0.08 | 0.08 | 0.10 | 0.14 |
| 43 | medium | 0.28 | 0.16 | 0.22 | 0.14 | 0.20 | 0.12 |
| 43 | large | 0.34 | 0.24 | 0.30 | 0.30 | 0.22 | 0.16 |
| 43 | giant | 0.28 | 0.26 | 0.18 | 0.18 | 0.06 | 0.10 |
| 44 | medium | 0.16 | 0.20 | 0.22 | 0.24 | 0.24 | 0.16 |
| 44 | large | 0.14 | 0.16 | 0.14 | 0.18 | 0.16 | 0.16 |
| 44 | giant | 0.22 | 0.16 | 0.12 | 0.12 | 0.08 | 0.12 |
| 45 | medium | 0.16 | 0.12 | 0.12 | 0.18 | 0.12 | 0.14 |
| 45 | large | 0.26 | 0.20 | 0.28 | 0.24 | 0.20 | 0.14 |
| 45 | giant | 0.38 | 0.18 | 0.18 | 0.18 | 0.08 | 0.06 |
| 46 | medium | 0.22 | 0.24 | 0.28 | 0.22 | 0.26 | 0.12 |
| 46 | large | 0.34 | 0.28 | 0.24 | 0.18 | 0.20 | 0.10 |
| 46 | giant | 0.12 | 0.08 | 0.06 | 0.12 | 0.04 | 0.04 |
**adajepa**
| seed | maze | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| 43 | medium | 0.56 | 0.48 | 0.44 | 0.50 | 0.44 | 0.30 |
| 43 | large | 0.08 | 0.02 | 0.06 | 0.06 | 0.08 | 0.04 |
| 43 | giant | 0.10 | 0.14 | 0.10 | 0.08 | 0.04 | 0.04 |
| 44 | medium | 0.50 | 0.40 | 0.28 | 0.50 | 0.38 | 0.20 |
| 44 | large | 0.12 | 0.06 | 0.08 | 0.12 | 0.02 | 0.10 |
| 44 | giant | 0.10 | 0.14 | 0.06 | 0.04 | 0.02 | 0.06 |
| 45 | medium | 0.50 | 0.34 | 0.34 | - | - | - |
| 45 | large | 0.06 | 0.04 | 0.08 | - | - | - |
| 45 | giant | 0.10 | 0.12 | 0.02 | - | - | - |
| 46 | medium | 0.48 | 0.34 | 0.28 | - | - | - |
| 46 | large | 0.12 | 0.08 | 0.18 | - | - | - |
| 46 | giant | 0.14 | 0.10 | 0.08 | - | - | - |
| 100 | medium | 0.62 | 0.40 | 0.48 | 0.42 | 0.40 | 0.28 |
| 100 | large | 0.12 | 0.12 | 0.06 | 0.08 | 0.02 | 0.08 |
| 100 | giant | 0.16 | 0.06 | 0.06 | 0.04 | 0.04 | 0.00 |
**dino_wm**
| seed | maze | 150/50 | 300/100 | 450/150 | 750/250 | 1500/500 | 3000/1000 |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|--- |
|---|
| 42 | medium | 0.78 | 0.56 | 0.60 | 0.62 | 0.46 | 0.54 |
| 42 | large | 0.28 | 0.08 | 0.12 | 0.06 | 0.08 | 0.08 |
| 42 | giant | 0.18 | 0.22 | 0.18 | 0.06 | 0.02 | 0.10 |
| 43 | medium | 0.68 | 0.64 | 0.74 | - | - | - |
| 43 | large | 0.22 | 0.10 | 0.06 | - | - | - |
| 43 | giant | 0.32 | 0.20 | 0.12 | - | - | - |
| 44 | medium | 0.72 | - | - | - | - | - |
| 44 | large | 0.12 | - | - | - | - | - |
| 44 | giant | 0.36 | - | - | - | - | - |
## 7. State at handoff (2026-10-07)
Nothing is running. Coverage: LeWM 5 seeds x 18 cells; RC-aux 5 seeds x 18 cells; adajepa 5 seeds on base cells,
3 seeds (100, 43, 44) on extended cells; dino_wm seed 42 on all 18 cells, seed 43 on the 9 base cells, seed 44 on 150/50
only (stopped by user). GPU 3 was never used for this work.
To add seeds: RC-aux `sh_script/rcaux_seed_guarded_gpu3.sh` (SEEDS, GPU, MAXJOBS=2), adajepa
`sh_script/adajepa_seeds_multi_gpu.sh` (GPU, PLAN="seed:reverse", CELLS, LAUNCHER=adajepa_seed_shard_launcher_gpu3.sh),
dino_wm `sh_script/dinowm_seed_launcher.sh` (FAST=1 for the fast bundle), LeWM `sh_script/lewm_seed_parallel.sh`.
Run one instance per GPU; they share work through result files and atomic claim directories.
## 8. Gotchas
- MuJoCo EGL ignores `CUDA_VISIBLE_DEVICES`; scripts set `MUJOCO_EGL_DEVICE_ID=$GPU` (GPU 3 → 2 because
GPU 3's EGL device hangs). Override with `EGL_DEVICE=`. "EGL limit"/framebuffer errors = that GPU is OOM.
- bash reads scripts incrementally: never edit an eval `.sh` while a run is inside it. Launchers copy a
snapshot to `log/eval_*_snapshot_*.sh` for that reason. Result files, not exit codes, are ground truth.
- Never `pkill -f`/`pgrep -f` a pattern that appears in your own command line; filter by `/proc/PID/exe`.
- Keep ≥0.5 TB free on `/data`. Do not modify the datasets. Do not write under `/home`.
- Each LeWM/RC-aux eval opens 50 MuJoCo renderers; too many concurrent ones on one GPU exhaust EGL memory
(MAXJOBS≈4–6 per GPU is safe alongside a dino_wm cell).
## 9. adajepa folder removal and HuggingFace archive
The adajepa working folder is too large to keep (`adajepa/data` 421 GB converted dataset, `checkpoints_ogmaze` 31 GB,
`eval_outputs` 1.5 GB) and will be deleted. Before deletion the essentials were uploaded to the HF dataset repo
`assa8945/OGbench`:
| HF path | Content |
|---|---|
| `results/ogmaze_results_all.csv` | all 282 success rates (this handoff's tables) |
| `results/adajepa_ogmaze_eval_results.zip` | every adajepa eval dir's `per_iter_logs.json`, `plan.log`, hydra config (15 MB) |
| `checkpoints/adajepa_ogmaze_epoch20_ckpts.zip` | the three `model_latest.pth` (epoch 20) + run configs used for all adajepa evals (1.2 GB) |
| `checkpoints/adajepa_ogmaze_handoff.zip` | earlier (Sep 6) archive: `model_20_frozen.pth` per maze, adapter and scripts |
| `checkpoints/lewm_ogmaze_epoch20_ckpts.zip` | LeWM epoch-20 checkpoints |
| `docs/HANDOFF_ogmaze_baseline_inference.md` | this file |
To rebuild adajepa's converted dataset from the h5 files (kept in `le-wm/datasets/pointmaze/`):
`python_script/h5_to_adajepa.py` (also inside `adajepa_ogmaze_handoff.zip` under `scripts/`); it writes
`adajepa/data/ogmaze_<maze>/` in the layout `datasets/point_maze_dset.py` expects. RC-aux and dino_wm checkpoints
(`RC-aux/checkpoints/rcaux_ogmaze_*`, `dino_wm/checkpoints_ogmaze/outputs/...`) are not on HF.