Skip to content

feat(single_controller): log weight_version_lag as a train metric - #4919

Merged
yuki-97 merged 2 commits into
NVIDIA-NeMo:mainfrom
mikhailshilkov:mshilkov/log-weight-version-lag
Oct 27, 2026
Merged

yuki-97 merged 2 commits into
NVIDIA-NeMo:mainfrom
mikhailshilkov:mshilkov/log-weight-version-lag

Conversation

@mikhailshilkov

Copy link
Copy Markdown
Contributor

What does this PR do ?

Logs the single controller's weight-version lag as train/weight_version_lag.

SingleControllerActor already 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's log_metrics call and adds it to step_metrics. The print is unchanged.

Testing

  • test_train_pump_e2e.py now 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 with CI:L0.
  • Other tests/unit/single_controller tests pass locally.

Issues

None.

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]>
@copy-pr-bot

copy-pr-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks @mikhailshilkov

@yuki-97 yuki-97 added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Oct 27, 2026
@yuki-97
yuki-97 enabled auto-merge (squash) October 27, 2026 10:03
@yuki-97

yuki-97 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

/ok to test a66fa35

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 27, 2026
@yuki-97
yuki-97 merged commit 4e9a597 into NVIDIA-NeMo:main Oct 27, 2026
93 checks passed
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) community-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants