fix(train): support eval-only mode (--num-rollout 0) - #2109
Closed
EazyReal wants to merge 2 commits into
Closed
Conversation
EazyReal
force-pushed
the
fix/eval-only-num-rollout-zero
branch
from
June 20, 2026 18:21
a658aac to
9e5f530
Compare
EazyReal
force-pushed
the
fix/eval-only-num-rollout-zero
branch
2 times, most recently
from
June 24, 2026 04:19
1f59044 to
6f3d1d3
Compare
Contributor
Author
|
@zhuzilin could you review this one? Eval-only mode with --num-rollout 0 still constructs the Megatron optimizer scheduler, which rejects zero lr_decay_steps; this keeps the training loop at zero rollouts while giving the scheduler the smallest valid shape. |
EazyReal
force-pushed
the
fix/eval-only-num-rollout-zero
branch
from
June 30, 2026 08:59
ac7dae8 to
cb285ec
Compare
EazyReal
added a commit
to EazyReal/slime
that referenced
this pull request
Jul 7, 2026
Contributor
Author
|
@zhuzilin refreshed on latest main and checks are green. This fixes eval-only runs with --num-rollout 0 so evaluation jobs can run without requiring rollout generation. Could you review when you have bandwidth? |
EazyReal
force-pushed
the
fix/eval-only-num-rollout-zero
branch
from
August 18, 2026 23:00
59ca769 to
dc2e26a
Compare
Megatron rejects lr_decay_steps == 0, which is what integer division produces when --num-rollout is 0. The train-path formula is unchanged.
EazyReal
force-pushed
the
fix/eval-only-num-rollout-zero
branch
from
August 21, 2026 00:50
dc2e26a to
5558efd
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks
Contributor
Author
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.
Desired vs bug
Eval-only is intended.
train.pyalready has:The train loop is
range(start_rollout_id, num_rollout), sonum_rollout == 0correctly does zero training steps. That part is working as designed.The crash is a bug in setup order.
create_training_models(and thus Megatron's LR scheduler) runs before that special case, because eval still needs the actor loaded andupdate_weights()into the rollout engines. Megatron assertslr_decay_steps > 0. The scheduler is never stepped in eval-only; it just has to construct.This is not divide-by-zero.
global_batch_sizeis fine. The estimate iswhich is
0whennum_rollout == 0. Thenlr_decay_itersdefaults totrain_iters, solr_decay_steps == 0, and optimizer init aborts. You never reach the eval special case.Change
train_iters = 1is only a dummy length so Megatron will construct the scheduler. It does not run a training step. Anynum_rollout > 0keeps the original formula.Skipping optimizer/scheduler entirely for eval-only would also work, but that is a larger split of
create_training_models. This keeps the existing bring-up path.Test plan
--num-rollout 0 --eval-interval 1gets past optimizer init and hitsrollout_manager.evaltrain_itersas before this PR