Skip to content

S25-C: resume manifest assertions for cut restore (N7.6) - #271

Draft
michaellchung wants to merge 1 commit into
s25-n7-trainerfrom
s25-n76-resume
Draft

michaellchung wants to merge 1 commit into
s25-n7-trainerfrom
s25-n76-resume

Conversation

@michaellchung

Copy link
Copy Markdown
Contributor
  • Neutral yeto/rl/engine/resume_manifest.py: Adam step, LR schedule progress, sampled moment norms/checksums, data watermark; asserted on restore and after the first step.
  • Wired into the Miles cut save/restore path (and the SSH trainer island). verl gets adapter helpers only (no cut save path yet).
  • Guards against the PPU report's silent Adam-step reset. Run-3/save/resume-2 == run-5 bit-identical on CPU.

Testing: Full remote test suite on the stack tip: 0 failures. Not validated on PPU/NPU hardware (machines busy).

Part of the S25 stack (NPU+PPU heterogeneous GLM5.3-Flash full-param RL). Draft; do not merge before the S24 stack (#262–#268).

🤖 Generated with Claude Code

…S25 N7.6)

A-TRN report #8: restoring optimizer state on PPU can silently reset the
Adam step. A cut now records a backend-neutral resume manifest (Adam step
per group, LR scheduler progress and applied LRs, exp_avg/exp_avg_sq norm
and sha256 of fixed sampled parameters, global step, data watermark).
After loading, every rank must match it; after the first step every
counter must advance by exactly the steps taken. Any mismatch raises
ResumeAssertionError (a CutError); a cut without the manifest is refused.

- yeto/rl/engine/resume_manifest.py: neutral types, checks, file form,
  torch.optim reader (FSDP2 DTensor local shards).
- Miles: cut shards report the rank state; save_cut embeds the manifest,
  restore_cut checks it before the digest comparison, the first
  train_step after a restore checks the advance.
- verl/FSDP2: worker binding (actor_module_fsdp/actor_optimizer/
  actor_lr_scheduler).
- CPU tests: train 3 + save + resume 2 equals train 5 (torch and FSDP2
  over gloo, 2 ranks); reset step, partial reset, fresh moments, reset
  scheduler and a non-advancing first step are all refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants