Repository navigation
Skip the last rollout's engine handoff unless a final eval follows - #3182
Merged
Merged
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
After the last train step nothing generates: the trainer offload, engine weight reload, weight update and KV reload only feed a final eval, and the loop disposes everything right after. On a colocated 16-node run the handoff is 1-3 minutes and is the memory-peak point of the step; a failure there after the final checkpoint has been saved turns a finished run into FAILED with nodes stuck in COMPLETING. Keep it only when eval_interval lands on the last rollout.
yueming-yuan
force-pushed
the
yueming/skip-final-handoff
branch
from
September 15, 2026 22:47
9109cf9 to
bded55a
Compare
Zhichenzzz
approved these changes
Sep 22, 2026
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.
After the last train step nothing generates any more: the trainer offload, the engine weight reload,
update_weightsand the KV reload only feed a final eval, and the loop disposes every component right after. The step's end-of-step block now runs only when another rollout follows oreval_intervallands on the last rollout.On the 16-node Kimi K3 colocated run this handoff is 1-3 minutes (
sleep12-130 s across ranks,update_weights29 s, plus the engine weight/KV reloads) and is the same host/GPU memory-peak point as every other step's handoff. Its failure there is pure loss: the final checkpoint is already saved, but the run ends FAILED and the nodes sit in COMPLETING while the worker steps are torn down.Behavior is unchanged for every step but the last, and for the last one whenever a final eval is due.
save()runs before this block and is unaffected.Not executed: no new test; the loop is exercised by the existing e2e suites (the last rollout of every CI recipe now skips the handoff).