Repository navigation
Conversation
This branch has not been deployed
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.
Stacked on #2186 (
stack/rl-ppo).Root cause
Role workers build a
LambdaLRfrom the role'sLRConfig, butRoleWorker.save()/resume()only go through DCP. The scheduler step is never written, so a resumed actor or critic restarts its LR curve from step 0, warmup included. Whenload_optimizer_args=True, the restored optimizer LR is also overwritten by the fresh schedule on the first step.Fix
save_lr_scheduler()writeslr_scheduler.jsoninto each role's DCP directory on rank 0, also whenno_save_optimizer=True.resume_lr_scheduler()loads it whenload_checkpoint_cfg.load_scheduleris set (the default), matching the SFT trainer. A missing file raises with a hint to setload_scheduler=False, which restarts the schedule.Test plan
tests/rl/test_scheduler_checkpoint.pychecks constant/linear/cosine resumes against an uninterrupted run, actor and critic wiring throughTrainingWorker.save/resumewith and without optimizer arguments, saving withno_save_optimizer=True, and the missing-file / restart paths. Together withtest_ppo_role_wiring.py,test_routed_experts_dtype.pyandtest_training_worker_rank.py: 65 passed on CPU.