Repository navigation
feat(single_controller): log weight_version_lag as a train metric - #4919
Merged
yuki-97 merged 2 commits intoOct 27, 2026
Merged
Conversation
The single controller only printed the lag between the trainer's weight version and the oldest consumed sample; log it with the train step metrics. Signed-off-by: Mikhail Shilkov <[email protected]>
yuki-97
approved these changes
Oct 27, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @mikhailshilkov
yuki-97
enabled auto-merge (squash)
October 27, 2026 10:03
Contributor
|
/ok to test a66fa35 |
1 task done
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.
What does this PR do ?
Logs the single controller's weight-version lag as
train/weight_version_lag.SingleControllerActoralready computes the lag (trainer weight version minus the oldest weight version among the samples used in the step), but it only prints it (train step … lag=…). So you can't chart staleness in W&B/TensorBoard/MLflow or compare it across runs. This moves the existing computation above the step'slog_metricscall and adds it tostep_metrics. The print is unchanged.Testing
test_train_pump_e2e.pynow asserts the metric is logged and non-negative on every step. It needs a GPU and Megatron, so it was not run locally; please run withCI:L0.tests/unit/single_controllertests pass locally.Issues
None.