File size: 1,664 Bytes
567e51a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Debug Tools

## Puzzle Eval-Stack Oracle Replay

The previous root-level `debug_puzzle.py` now lives in this directory. Run it
from the repository root:

```bash
MUJOCO_GL=egl python debug/debug_puzzle.py --config-name=puzzle
```

## PushT Multi-Step Latent Rollout Drift

`debug_pusht_rollout.py` freezes a trained HyperbolicJEPA checkpoint and replays
ground-truth PushT actions from the offline dataset. It compares each predicted
latent against the encoded real future frame for blocks `1...5`.

The script writes:

- `rollout_drift.png`: Euclidean, tangent-space, and Lorentz error curves.
- `rollout_drift_summary.json`: run metadata and aggregated metrics.
- `rollout_drift_summary.csv`: aggregated metrics for plotting or tables.
- `rollout_drift_per_sequence.csv`: per-window metrics for deeper analysis.

Each curve contains two modes:

- `autoregressive`: append each predicted latent and continue rollout.
- `teacher_forced`: restart each one-step prediction from real encoded frames.

Interpretation:

- Low teacher-forced error with rapidly rising autoregressive error indicates
  compounding rollout drift.
- High error from block 1 indicates a one-step dynamics or action-protocol
  issue.
- Similar low curves with poor planning SR point toward candidate sampling or
  goal-cost alignment instead of dynamics quality.

Example:

```bash
MUJOCO_GL=egl python debug/debug_pusht_rollout.py \
  --policy /data_nvme/user/zliu681/le-wm-main/lewm_cache/pusht/hyperbolic_pusht/lewm_hyperbolic_pusht_epoch_10 \
  --dataset pusht/pusht_expert_train \
  --device auto \
  --num-sequences 512 \
  --context-blocks 3 \
  --max-blocks 5 \
  --frameskip 5
```