Repository navigation
refactor(loss): remove the deprecated token level loss selector - #5276
Conversation
|
/ok to test c3356af |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
I found no blocking correctness defect in the supplied diff, including the stacked reduction changes. C1 requests training evidence for the new objective; C2 is a test-maintenance suggestion.
This was a static review across three assigned topics. I did not execute tests or verify CI. Pinned third-party source and review threads from the prerequisite PRs were unavailable, so I could not independently check those references.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
c3356af to
9c68ff7
Compare
|
/ok to test 9c68ff7 |
9c68ff7 to
cbd3db0
Compare
|
/ok to test cbd3db0 |
cbd3db0 to
c9b2794
Compare
|
/ok to test c9b2794 |
mehraakash
left a comment
There was a problem hiding this comment.
Thanks for the clean removal and migration. I reviewed this layer only (the one commit on top of #4947) and found no blocking issue.
Verified
- No reader of
token_level_lossremains outside the rejection code, its tests and the golden generator. - All 31 YAMLs keep their reduction; the effective reduction of 466 YAMLs under examples, research and tests is unchanged between the stack base and this head.
- Both rejection paths (the model validator and
check_outdated_config) each have a test that fails when that path is removed. CPU run of the touched unit files: 768 passed, 49 skipped (47 need CUDA).
Notes, no action required in this PR
- The branch conflicts with main; please restack after #4946 and #4947 land.
loss_fnis part of the rollout bootstrap fingerprint (rollout_checkpointing/manifest.py:55). Could you confirm whether a snapshot written before this rename still resumes, and add the remedy to the guide if not? I did not reproduce a failure.- The one-word edit in
skills/pr-html-concise-public/SKILL.mdis correct; a line in the description would help reviewers.
Two inline test nits follow.
Generated by Claude Code
|
/resolve-conflict |
Signed-off-by: svcnemo-autobot <[email protected]>
|
/ok to test ab546c9 |
ab546c9 to
4c133f3
Compare
|
/ok to test 4c133f3 |
confirmed that resuming from old snapshot will fail, added to the guide! |
4c133f3 to
138f037
Compare
|
/ok to test 138f037 |
138f037 to
599b0e2
Compare
|
/ok to test 599b0e2 |
|
/ok to test 152d7aa |
u-brixton
left a comment
There was a problem hiding this comment.
LGTM — no actionable findings at 152d7aa. The selector migration preserves existing loss reductions, rejects the removed key with migration guidance, and documents bootstrap recovery.
Four collaborating agents covered five specialist roles, an independent adversarial review in two passes, and an editorial pass.
Validation: 106 outdated-config tests passed with one expected skip. All 31 YAML edits preserve selector meaning, and the golden fixture's numerical values and provenance are unchanged. Pinned Ruff 0.9.9 lint, import and format checks passed, along with Python and shell syntax and diff whitespace checks.
Full numerical, GPU, distributed and functional tests were not run. Full pre-commit could not start because the installed uv cannot parse the current TOML. The Ruff fallback does not replace full type and config CI.
nemo-rl-review: kind=self harness=codex/0.169.0 model=gpt-6.1-sol effort=medium review-pr-team=v2 reviewed=152d7aa
152d7aa to
0d4aebb
Compare
|
/ok to test 0d4aebb |
Signed-off-by: Renat Zayashnikov <[email protected]>
Signed-off-by: Renat Zayashnikov <[email protected]>
Signed-off-by: Renat Zayashnikov <[email protected]>
Signed-off-by: Renat Zayashnikov <[email protected]>
0d4aebb to
16ebdc1
Compare
|
/ok to test 16ebdc1 |
terrykong
left a comment
There was a problem hiding this comment.
Thanks for finishing this removal. Old configs that still set token_level_loss now fail at startup with the exact fix to apply, which is much better than finding out in a convergence run. The leftover L1 override is fixed in 4341c72, and the snapshot note now names the removed key.
Generated by Claude Code
…arness Main removed loss_fn.token_level_loss (NVIDIA-NeMo#5276), so ClippedPGLossConfig now rejects it. Iterate the parity harness over normalization in ("global_token_mean", "sequence_mean"), which is what True and False resolved to, and key the partition ids and report rows on that name. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Shuang Yu <[email protected]>
…arness Main removed loss_fn.token_level_loss (NVIDIA-NeMo#5276), so ClippedPGLossConfig now rejects it. Iterate the parity harness over normalization in ("global_token_mean", "sequence_mean"), which is what True and False resolved to, and key the partition ids and report rows on that name. Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Shuang Yu <[email protected]>
What and why
This PR follows #4947, which is now merged into
main.Remove the deprecated
loss_fn.token_level_lossselector. Migrate all 31 checked-in YAML configs, including example recipes, Gym and ModelOpt configs, the research template, and reference fixtures. Updatethe docs, CLI overrides, tests, and numerical golden fixture to use
loss_fn.normalization. The public PR explainer skill now names the canonical selector.Older configs must replace
truewithglobal_token_meanandfalsewithsequence_mean. Delete the old key when its value isnull. Both the config entrypoints and directClippedPGLossConfigconstruction report that migration. The golden generator still translates the canonical selector when it runs against its pinned historical implementation.
Before the first trainer checkpoint, the rollout bootstrap identity includes the serialized loss config. Recover a bootstrap snapshot written before this removal with its original NeMo-RL version and config,
then save a trainer checkpoint before upgrading. The GRPO guide documents this recovery path.
Convergence / perf / functionality proof
isolated CPU environment used PyTorch 2.8.0.
git diff --checkpassed locally.Needs upstream changes
None