Skip to content

validator: skip global_state.pt on resume - #129

Open
isabella618033 wants to merge 1 commit into
masterfrom
validator/skip-global-state-on-resume
Open

validator: skip global_state.pt on resume#129
isabella618033 wants to merge 1 commit into
masterfrom
validator/skip-global-state-on-resume

Conversation

@isabella618033

Copy link
Copy Markdown
Contributor

Summary

  • Removes outer_scaler from the validator's load_checkpoint call in setup_training, so the validator no longer reads global_state.pt on resume.
  • load_checkpoint gates the global_state.pt read on scheduler is not None or inner_scaler is not None or outer_scaler is not None (shared/checkpoint_helper.py:697). The validator passes none of those after this change, so the function returns -1 from the early branch and skips opening global_state.pt entirely.
  • outer_optimizer and the dataloader are still restored on resume. Miner (miner/train.py) is unchanged — it legitimately needs global_state.pt to restore its scheduler and inner_scaler.

Test plan

  • Resume a validator from an existing checkpoint and confirm no global_state.pt read occurs in the load path (only inner/outer_optimizer*.pt and dataloader_rank*.pt).
  • Resume a validator from a checkpoint dir with no global_state.pt file present and confirm setup_training no longer raises at the fsspec.open site.
  • Verify miner resume is unaffected (scheduler, inner_scaler, outer_scaler still restored).

🤖 Generated with Claude Code

Drop outer_scaler from the validator's load_checkpoint call so the
resume path no longer reads global_state.pt. load_checkpoint gates the
global_state.pt read on scheduler/inner_scaler/outer_scaler being
non-None; the validator passes none of those, so the function now
returns -1 from the early branch and only restores outer_optimizer and
the dataloader. Miner is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <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.

1 participant