Repository navigation
feat(sc): log sample-lag mean and percentiles - #5272
Merged
yuki-97 merged 4 commits intoNov 24, 2026
Merged
Conversation
Signed-off-by: Christian Muertz <[email protected]>
yuki-97
reviewed
Nov 17, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
This PR keeps weight_version_lag as the step's maximum lag and adds its mean and p50/p90/p95/p99. The new statistics are computed once over the lags from every chunk of the step, so a rollout counts the same whether it arrived in a small chunk or a large one.
Scope: the sample-lag statistics in the SingleController step loop, at 1c03ac5
Checked:
weight_version_lagis unchanged: max(v − w) equals v − min(w), and an empty step still logs 0.- Lags are collected once per consumed chunk, outside the PPO epoch loop, so epochs and critic passes do not count a sample twice.
- The removed
min_sample_versionhad no other reader, and step 4 of the_train_pumpdocstring matches the code (single_controller.py:2765). - Pooling raw lags and reducing them once, instead of averaging chunk means, gives every row the same weight. That matches the stated intent outside forest training.
Remaining comments are on:
- rollout weighting of the lag statistics under forest training
nit
- name the max lag key
weight_version_lag_maxto match the new suffixes
Generated by Claude Code (#4999 version)
Signed-off-by: Christian Muertz <[email protected]>
Signed-off-by: Christian Muertz <[email protected]>
Contributor
Author
|
/ok to test 49fd9fe |
…ample-lag-percentiles Signed-off-by: Christian Muertz <[email protected]>
Contributor
Author
|
/ok to test 30e0d23 |
yuki-97
approved these changes
Nov 24, 2026
fujial-code
added a commit
that referenced
this pull request
Nov 24, 2026
Picks up #5271 and #5272; no conflicts. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: fujial <[email protected]>
1 task done
sharonyu-115
pushed a commit
to sharonyu-115/RL
that referenced
this pull request
Nov 26, 2026
…full-batch checks NVIDIA-NeMo#5272 renamed train/weight_version_lag to train/weight_version_lag_max, so the smoke test and the three nightly drivers asserted on a key that is no longer logged, and check_metrics.py fails a check whose key is missing. Also point the design doc at the new metric name and fix a 'below' that refers to a recipe listed above. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: Shuang Yu <[email protected]>
sharonyu-115
added a commit
to sharonyu-115/RL
that referenced
this pull request
Nov 26, 2026
…full-batch checks NVIDIA-NeMo#5272 renamed train/weight_version_lag to train/weight_version_lag_max, so the smoke test and the three nightly drivers asserted on a key that is no longer logged, and check_metrics.py fails a check whose key is missing. Also point the design doc at the new metric name and fix a 'below' that refers to a recipe listed above. Signed-off-by: Shuang Yu <[email protected]>
sharonyu-115
added a commit
to sharonyu-115/RL
that referenced
this pull request
Nov 27, 2026
…full-batch checks NVIDIA-NeMo#5272 renamed train/weight_version_lag to train/weight_version_lag_max, so the smoke test and the three nightly drivers asserted on a key that is no longer logged, and check_metrics.py fails a check whose key is missing. Also point the design doc at the new metric name and fix a 'below' that refers to a recipe listed above. Signed-off-by: Shuang Yu <[email protected]>
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 and why
The maximum rollout lag alone cannot distinguish one stale rollout from a stale training batch. Pool lags across every consumed chunk and log
weight_version_lag_mean,weight_version_lag_p50/p90/p95/p99, andweight_version_lag_max. The maximum was previously logged asweight_version_lag.Each consumed rollout contributes once. Under forest training its first segment represents the rollout and padding contributes nothing. Lag is the step's training weight version minus the version in the row tag. On the token-capture path all siblings carry the group's oldest observed version. Empty steps log a maximum of zero. Nonempty steps report all statistics with inclusive percentile interpolation.
Issues
None.
Convergence / perf / functionality proof
This change only affects metric reporting. Ruff lint, formatting and focused CPU checks passed for forest segments and padding, ordinary rows without segment metadata, and empty steps. The controller test now checks the renamed maximum. The full controller suite was not run locally.
Needs upstream changes
None.