Skip to content

Skip the last rollout's engine handoff unless a final eval follows - #3182

Merged
yueming-yuan merged 1 commit into
mainfrom
yueming/skip-final-handoff
Sep 22, 2026
Merged

yueming-yuan merged 1 commit into
mainfrom
yueming/skip-final-handoff

Conversation

@yueming-yuan

Copy link
Copy Markdown
Collaborator

After the last train step nothing generates any more: the trainer offload, the engine weight reload, update_weights and 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 or eval_interval lands on the last rollout.

On the 16-node Kimi K3 colocated run this handoff is 1-3 minutes (sleep 12-130 s across ranks, update_weights 29 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).

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
yueming-yuan force-pushed the yueming/skip-final-handoff branch from 9109cf9 to bded55a Compare September 15, 2026 22:47
@yueming-yuan
yueming-yuan merged commit 0bc3cf0 into main Sep 22, 2026
24 checks passed
@yueming-yuan
yueming-yuan deleted the yueming/skip-final-handoff branch September 22, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants