Skip to content

fix(grpo): update grpo_sync seq_logprob_error_masking call site - #2599

Closed
ZhiyuLi-Nvidia wants to merge 1 commit into
mainfrom
fix/grpo-sync-seq-logprob-error-unpack
Closed

fix(grpo): update grpo_sync seq_logprob_error_masking call site#2599
ZhiyuLi-Nvidia wants to merge 1 commit into
mainfrom
fix/grpo-sync-seq-logprob-error-unpack

Conversation

@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

Summary

  • Fixes regression on main introduced when PR #2559 changed compute_and_apply_seq_logprob_error_masking to return a dict but missed updating the call site in grpo_sync.py.
  • L1_Functional_Tests_GPU on main is currently failing with ValueError: too many values to unpack (expected 3) at nemo_rl/algorithms/grpo_sync.py:772 — see failing job.
  • Aligns grpo_sync.py with the dict-based pattern already in use at grpo.py:1935-1963 and grpo.py:3064-3091, so the sync recipe now also surfaces the richer mean / min / after-mask metrics.

Test plan

  • CI L1 (/ok to test <sha>) — should turn L1_Functional_Tests_GPU green again.
  • Local sanity: grep confirms the only remaining 3-tuple unpacking is gone.

🤖 Generated with Claude Code

PR #2559 changed compute_and_apply_seq_logprob_error_masking to return
a dict of 8 keys (previously a 3-tuple of max_seq_mult_prob_error,
num_masked_seqs, masked_correct_pct). The two call sites in grpo.py
were updated, but the call site in grpo_sync.py was missed, causing
L1_Functional_Tests_GPU to fail on main with:

    File ".../nemo_rl/algorithms/grpo_sync.py", line 772, in grpo_train_sync
    ValueError: too many values to unpack (expected 3)

Aligns grpo_sync.py with the dict-based pattern already in use at
grpo.py:1935-1963 and grpo.py:3064-3091, and propagates the richer
mean/min and after-mask metrics to the sync recipe.

Signed-off-by: Zhiyu Li <zhiyul@nvidia.com>
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia requested a review from a team as a code owner May 28, 2026 17:24
@copy-pr-bot

copy-pr-bot Bot commented May 28, 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.

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.

1 participant