validator: skip global_state.pt on resume - #129
Open
isabella618033 wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
outer_scalerfrom the validator'sload_checkpointcall insetup_training, so the validator no longer readsglobal_state.pton resume.load_checkpointgates theglobal_state.ptread onscheduler 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 openingglobal_state.ptentirely.outer_optimizerand the dataloader are still restored on resume. Miner (miner/train.py) is unchanged — it legitimately needsglobal_state.ptto restore its scheduler and inner_scaler.Test plan
global_state.ptread occurs in the load path (onlyinner/outer_optimizer*.ptanddataloader_rank*.pt).global_state.ptfile present and confirmsetup_trainingno longer raises at thefsspec.opensite.scheduler,inner_scaler,outer_scalerstill restored).🤖 Generated with Claude Code