Repository navigation
train: don't load PI base weights on resume and verify that checkpoint path exists - #636
Conversation
141d779 to
8fccb8f
Compare
3d8ffd1 to
d25f8ca
Compare
8fccb8f to
8803dee
Compare
8803dee to
fb14ce8
Compare
d25f8ca to
4a8be78
Compare
|
| checkpoint = torch.load( | ||
| ckpt_path, map_location="cpu", weights_only=False, mmap=True | ||
| ) |
There was a problem hiding this comment.
Legacy checkpoints fail evaluation
If an evaluation checkpoint uses PyTorch's legacy, non-zip format, mmap=True raises before any weights are loaded. The training checkpoint loader falls back to a normal read for this format, but this new evaluation loader does not. As a result, a checkpoint that can resume training cannot be evaluated. Please provide the same fallback here.
| dims: | ||
| action_width: 14 | ||
| eva_bimanual: | ||
| action: ${model.robomimic_model.dims.action_width} | ||
| human_bimanual: | ||
| action: ${model.robomimic_model.dims.action_width} |
There was a problem hiding this comment.
Shared width ignores action padding
This config, along with the other shared-head configs, now uses dims.action_width for sampling and the model input, but action preprocessing still pads 12-dimensional human actions to exactly 14 dimensions. Overriding action_width to 16 would therefore send 14-dimensional training inputs to a 16-dimensional head. Either make padding follow the configured width or document and constrain the width to 14.
b9e1287 to
ffebd78
Compare
53a0ce1 to
eb7a3f3
Compare
ffebd78 to
bcb8775
Compare
stem input_dim, infer_ac_dims, act_dim and enc-dec output_dim now interpolate
robomimic_model.dims.{<emb>.proprio,<emb>.action,action_width}. Resolved values
are unchanged (pinned by tests/unit/test_model_dims.py). Pi configs untouched.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s
…ts on resume Slurm requeue detection moves above ModelWrapper construction and reads the checkpoint dir from cfg (callbacks.model_checkpoint.dirpath, else <run>/checkpoints); it resumes only when last.ckpt exists (a job preempted before its first checkpoint warns and falls back to the launch-time ckpt_path). When cfg.ckpt_path is an existing checkpoint file, the model's config tree gets model.robomimic_model.config.pytorch_weight_path=null: the checkpoint holds every weight, so a PI run resumes or evaluates without the multi-GB base safetensors on disk. cfg itself keeps the path, so logged hyperparameters are unchanged. Lightning's special values (last, best, hpc, registry) keep the base weights, since they may resolve to no checkpoint. Exception: eval_latent's pretrained=true, where ckpt_path only routes the output dir and the base weights are the model under test. Eval loads (trainHydra eval branch, eval_latent.run) go through load_checkpoint_weights (mmap'd torch.load): missing keys raise, unexpected keys warn. With base weights skipped, strict=False would have run random weights silently. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s
bcb8775 to
935ec33
Compare

Slurm requeue detection moves above ModelWrapper construction and reads the
checkpoint dir from cfg (callbacks.model_checkpoint.dirpath, else
/checkpoints); it resumes only when last.ckpt exists (a job preempted
before its first checkpoint warns and falls back to the launch-time ckpt_path).
When cfg.ckpt_path is an existing checkpoint file, the model's config tree gets
model.robomimic_model.config.pytorch_weight_path=null: the checkpoint holds
every weight, so a PI run resumes or evaluates without the multi-GB base
safetensors on disk. cfg itself keeps the path, so logged hyperparameters are
unchanged. Lightning's special values (last, best, hpc, registry) keep the base
weights, since they may resolve to no checkpoint. Exception: eval_latent's
pretrained=true, where ckpt_path only routes the output dir and the base
weights are the model under test.
Eval loads (trainHydra eval branch, eval_latent.run) go through
load_checkpoint_weights (mmap'd torch.load): missing keys raise, unexpected
keys warn. With base weights skipped, strict=False would have run random
weights silently.
Co-Authored-By: Claude Fable 5.1 [email protected]
Claude-Session: https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh
Co-Authored-By: Claude Opus 5 (1M context) [email protected]
Claude-Session: https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWtR1x5tjREwoxQZAnUGrh
https://claude.ai/code/session_01BbQNNaMAbTNMypegmJkv4s