Conversation
--num-rollout 0 still loads actor weights for eval. It does not train, so do not construct Megatron/FSDP optimizer or LR scheduler (which asserts lr_decay_steps > 0). Dummy train_iters=1 would lie about the schedule.
EazyReal
requested review from
Rockdu,
Shi-Dong,
Zhichenzzz,
fzyzcjy,
guapisolo,
maocheng23,
yueming-yuan and
yushengsu-thu
as code owners
August 21, 2026 03:06
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.
Replaces #1494. Twin of THUDM/slime#2296.
Desired vs bug
Eval-only is intended.
train.pyalready has:The train loop is
range(..., num_rollout), so this correctly does zero training steps. Eval still needs the actor loaded andupdate_weights()into the rollout engines, socreate_training_modelsruns first.The bug is that bring-up always constructed the optimizer and LR scheduler. With
--num-rollout 0,train_itersis 0 →lr_decay_stepsis 0, and both Megatron andFSDPLRSchedulerassertlr_decay_steps > 0. You never reach the eval special case.Why not
train_iters = 1That was #1494. It lies to the scheduler, then still runs zero train steps. Eval-only does not train, so it should not build a train stack.
Change
setup_model_and_optimizer: afterget_model, ifnum_rollout == 0, setno_load_optimand return(model, None, None). Same pattern as--debug-disable-optimizer.create_training_models: do not allocate a critic whennum_rollout == 0.num_rollout > 0is unchanged.Test plan
--num-rollout 0 --eval-interval 1loads the actor, skips optimizer/scheduler, hitsrollout_manager.evalMade with Cursor