Skip to content

fix(genrm_compare): name output-budget exhaustion (max_output_tokens) in the judge failure - #3303

Merged
yaoyu-33 merged 2 commits into
NVIDIA-NeMo:mainfrom
balajinvda:fix/genrm-budget-exhaustion
Oct 2, 2026
Merged

yaoyu-33 merged 2 commits into
NVIDIA-NeMo:mainfrom
balajinvda:fix/genrm-budget-exhaustion

Conversation

@balajinvda

@balajinvda balajinvda commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Names GenRM output-budget exhaustion in the judge failure instead of reporting it as a generic "no completed answer", in resources_servers/genrm_compare. No behaviour change: same retries, same JudgeError, only the message and a per-attempt warning.

Why

When the GenRM model spends its whole max_output_tokens on reasoning, the model server returns HTTP 200 with a complete envelope and no verdict: status: "incomplete", incomplete_details.reason: "max_output_tokens". Since #2814 and #3351 the retry path already handles this correctly (retry, then JudgeError), but the error reads the same as an empty or garbled answer, so an operator cannot tell a budget problem from a transport or parsing one without opening the raw response.

Measured against a hosted GenRM endpoint with the candidates delivered as response_1/response_2 roles, temperature 0.6, same input each time:

max_output_tokens runs verdict (status: completed) exhausted (status: incomplete, reason: max_output_tokens, no verdict)
16,384 5 2 3
24,576 4 2 2

The outcome is bimodal: the same input either converges at roughly 8 to 10k output tokens or runs away and consumes whatever budget it is given (4 of 4 still exhausted at 49,152), so the fix belongs with the judge's prompt or reasoning budget, and the message now points there.

How

  • _output_budget_exhausted(raw_response): true when the Responses object is incomplete with reason max_output_tokens.
  • Each such attempt logs GenRM output budget exhausted for pair (i, j) (attempt a/n, max_output_tokens=N).
  • When all attempts fail without a completed answer, the existing JudgeError message gains (k of them exhausted max_output_tokens=N without emitting a verdict; raise the budget or constrain the judge's reasoning). Completed-but-empty answers keep the unchanged generic message.
  • Tests: detection helper, all attempts exhausted -> message names the budget, exhausted then verdict -> normal parse, empty completed answer -> generic message. resources_servers/genrm_compare/tests: 35 passed.

Per review, the earlier opt-in budget escalation (genrm_budget_exhausted_retry_multiplier, genrm_max_output_tokens_cap) is dropped.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally (resources_servers/genrm_compare/tests, 35 passed).
  • Pre-commit checks pass locally (pre-commit run --files ...: all Passed).
  • All commits have DCO sign-off (git commit -s).

@copy-pr-bot

copy-pr-bot Bot commented Sep 10, 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.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Sep 10, 2026
@yaoyu-33 yaoyu-33 added area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer and removed community-request Issue reported or requested by someone from the community labels Sep 10, 2026
@balajinvda
balajinvda force-pushed the fix/genrm-budget-exhaustion branch from 3980bdc to d9baf0f Compare September 10, 2026 23:46
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Sep 11, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 13, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@yaoyu-33 yaoyu-33 removed the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Sep 14, 2026
@cmunley1

Copy link
Copy Markdown
Contributor

Since #2814/#3351, an incomplete response is no longer silently defaulted: it's retried and then raises JudgeError("no completed answer"). Should we trim this to just naming the cause (max_output_tokens exhausted) in that JudgeError message, and drop the multiplier and cap?

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Sep 29, 2026
@yaoyu-33 yaoyu-33 removed the community-request Issue reported or requested by someone from the community label Sep 29, 2026
When every attempt comes back incomplete with incomplete_details.reason=
max_output_tokens, the judge spent its whole output budget (typically on
reasoning) and never emitted a verdict. The retry path already raises
JudgeError("no completed answer") for this; the message now says how many
attempts exhausted the budget and at what max_output_tokens, and each such
attempt logs a warning, so operators can tell a budget problem from a
transport or parsing one.

Co-Authored-By: Balaji Ganesan <bganesan@nvidia.com>
Signed-off-by: Balaji Ganesan <bganesan@nvidia.com>
@balajinvda
balajinvda force-pushed the fix/genrm-budget-exhaustion branch from d9baf0f to e71b081 Compare October 1, 2026 04:22
@balajinvda balajinvda changed the title fix(genrm_compare): surface GenRM output-budget exhaustion (empty verdict) instead of a generic parse failure fix(genrm_compare): name output-budget exhaustion (max_output_tokens) in the judge failure Oct 1, 2026
@balajinvda

Copy link
Copy Markdown
Contributor Author

Agreed, and done. Rebased onto main and trimmed to exactly that: the existing retry-then-JudgeError path is unchanged, but when the attempts came back incomplete with reason=max_output_tokens the error now says so (k of them exhausted max_output_tokens=N without emitting a verdict), and each such attempt logs a warning. The multiplier and cap are dropped. Tests updated accordingly (35 passed), pre-commit clean.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 1, 2026
@balajinvda
balajinvda requested a review from yaoyu-33 October 1, 2026 04:23
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 1, 2026
@yaoyu-33 yaoyu-33 added needs-review PR is ready for code review and waiting on a reviewer and removed community-request Issue reported or requested by someone from the community labels Oct 1, 2026

@yaoyu-33 yaoyu-33 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. The escalation knobs are removed, and this now only clarifies output-budget exhaustion while preserving the existing retry and JudgeError behavior.

@yaoyu-33 yaoyu-33 added ready-to-merge PR is approved, current, and waiting for final CI or merge and removed needs-review PR is ready for code review and waiting on a reviewer labels Oct 2, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-customer Waiting on the original author to respond label Oct 2, 2026
@yaoyu-33 yaoyu-33 removed the ready-to-merge PR is approved, current, and waiting for final CI or merge label Oct 2, 2026
@ananthsub

Copy link
Copy Markdown
Contributor

/ok to test daf175a

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 2, 2026
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 2, 2026 15:39
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-customer Waiting on the original author to respond label Oct 2, 2026
@yaoyu-33
yaoyu-33 added this pull request to the merge queue Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/37048033494

Merged via the queue into NVIDIA-NeMo:main with commit a7ecb72 Oct 2, 2026
45 checks passed

This branch was previously deployed

1 inactive deployment
public — daf175ab Deployed Oct 2, 2026 by copy-pr-bot[bot] via release / finalize / notify #4196
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers bug Something isn't working community-request Issue reported or requested by someone from the community complexity:low Localized change in one scope with a small, straightforward review surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants