Skip to content

fix(equivalence_llm_judge): raise the README judge budget so a reasoning judge reaches a verdict - #5110

Merged
weijiac0619 merged 2 commits into
mainfrom
qiaochuz/reg-20261026-equivalence-llm-judge-judge-budget
Oct 28, 2026
Merged

weijiac0619 merged 2 commits into
mainfrom
qiaochuz/reg-20261026-equivalence-llm-judge-judge-budget

Conversation

@qiaochuz-nv

@qiaochuz-nv qiaochuz-nv commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Makes the equivalence_llm_judge README launch give the judge enough output tokens to reach a verdict. The README's gym env start set judge_responses_create_params.max_output_tokens=256. The judge is the policy model, so when the policy is a reasoning model, the judge can spend the whole 256 tokens reasoning and stop incomplete before it writes [[A=B]] or [[A!=B]]. That rollout then scores 0 whatever the answer was. This PR raises the documented budget to 8192, the value #5102 uses for text_to_sql.

Found while checking other READMEs for the text_to_sql judge-budget problem (#5102); no NVBug filed.

Cause

resources_servers/equivalence_llm_judge/README.md:90 passes max_output_tokens=256 to the judge, and configs/equivalence_llm_judge.yaml sets judge_model_server.name: policy_model. The README says it was tested with Gemma3-27B-it, a model that does not reason first. A judge reply cut off at the budget carries no marker, so _parse_judge_verdict returns verdict_label=None with judgement_parsing_issues: [truncated_judge_output, no_verdict] (app.py:97-125), and verify scores the rollout 0.0. The parsing and scoring are correct; only the documented budget is too small.

Fix

Why 8192: across three runs at 8192 (90 judge calls) none starved; the largest call used 4980 tokens, so 4096 would have starved it. Calls on four of the five rows used 100–520 tokens. Every longer call came from the fifth row, whose answer is borderline (gold amino): its 12 samples used up to 4980 tokens. 8192 matches #5102 and costs nothing on calls that finish early.

Before the fix

Gym 59406c7b5 (main), offline test from this branch:

pytest tests/unit_tests/test_equivalence_llm_judge_readme_config.py -q
>       assert resources.judge_responses_create_params.max_output_tokens == 8192
E       AssertionError: assert 256 == 8192

On the same main, a QA run of the README flow: gym env start with the README's overrides taken verbatim from the checkout's README, gym eval run on the 5 shipped examples × 4 repeats, then 10 live /verify controls (each row's gold answer, and \boxed{42}). Policy and judge: a reasoning model (nvidia/nvidia/nemotron-3.5-super-vl-preview).

README overrides (budget 256): [...max_output_tokens=256, ...judge_system_message=You are a careful arbiter., ...judge_prompt_template=...]
Judge budget summary: {"budget": 256, "judge_calls": 30, "starved": 15, "starved_exactly_at_budget": 15, "completed": 15,
  "completed_with_verdict": 15, "max_completed_output_tokens": 255, "rollout": {"calls": 20, "starved": 8, "verdicts": 12},
  "control": {"calls": 10, "starved": 7, "verdicts": 3}}
example_rollouts aggregate: mean/reward 0.6, judgement_parsing_issue_rate 0.4 (= /no_verdict = /truncated_judge_output)
  all 8 zero-reward rollouts are judge calls status=incomplete, output_tokens=256, verdict_label=None

After the fix

Gym 446d68104 (this branch, on main 59406c7b5):

============================== 1 passed ==============================

The same QA run, now reading 8192 from the branch README:

README overrides (budget 8192): [...max_output_tokens=8192, ...judge_system_message=You are a careful arbiter., ...judge_prompt_template=...]
Judge budget summary: {"budget": 8192, "judge_calls": 30, "starved": 0, "completed": 30, "completed_with_verdict": 30,
  "max_completed_output_tokens": 4980, "rollout": {"calls": 20, "starved": 0, "verdicts": 20},
  "control": {"calls": 10, "starved": 0, "verdicts": 10}}
example_rollouts aggregate: mean/reward 1.0, judgement_parsing_issue_rate 0.0
controls: 5/5 gold answers [[A=B]], 5/5 \boxed{42} [[A!=B]]
PASS   371.0s  README launch at the README judge budget: every judge call recorded

Validation

  • QA run of the README flow on h100-207 (live reasoning model; one run at a time): before on main 59406c7b5, 15/30 judge calls starved at 256 and 8/20 rollouts scored 0 with no verdict; after on 446d68104, 0/30 starved, 20/20 rollouts 1.0, controls 10/10 graded correctly. Earlier runs on main 74030391e: 8/30 starved at 256; two runs at 8192 with 0/60 starved (largest 2468 tokens).
  • pytest tests/unit_tests/test_equivalence_llm_judge_readme_config.py: fails on main (256 == 8192), passes on this branch.
  • Head 2b47d62c7 is rebased on main 7520cf42d; its README change is identical to 446d68104, the head the QA runs used. The replay test parses with offline=True (review suggestion): it passes with _find_open_port_using_range, setup_exporters, socket.gethostbyname and socket.bind patched to raise, and still fails with the README at 256.
  • pytest resources_servers/equivalence_llm_judge/tests: 103 passed, 19 failed on a Mac whose hostname does not resolve (Cannot resolve host ... for use_absolute_ip=true in test_hle_diamond.py); the same 19 fail with main's README, so they are environment-only and unrelated to this change.
  • pre-commit run --all-files: passed.
  • Rollout evidence: the QA runs above are real README rollouts with a live reasoning model.

Compatibility

Docs and a test only; no config or code default changes. Users who copy the README command now give the judge up to 8192 output tokens, so a reasoning judge can cost more per call but returns a verdict. Not changed here: the same README block also overrides judge_prompt_template, which is not a field of this server's config (it reads judge_prompt_template_fpath); the key is accepted and ignored, and the judge uses the shipped prompt_templates/equivalence_llm_judge.txt. That is a separate docs question.

🤖 Generated with Claude Code

@qiaochuz-nv qiaochuz-nv added QA_fix Fix implemented by a QA team member docs Documentation-only updates or documentation debt area:environment Individual environments, benchmarks, verifiers, and environment-specific resources servers needs-review PR is ready for code review and waiting on a reviewer complexity:low Localized change in one scope with a small, straightforward review surface labels Oct 27, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 27, 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.

@qiaochuz-nv
qiaochuz-nv requested a review from yaoyu-33 October 27, 2026 05:09
@qiaochuz-nv

Copy link
Copy Markdown
Contributor Author

/ok to test 446d681

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

SHIP

Reviewed the README change and regression test, tracing CLI translation, configuration resolution, judge requests, and scoring. The override reaches the policy judge without changing runtime defaults or verdict semantics.

One optional test-isolation NOTE below; no blocking concerns found. Static review only—tests and the reported live QA were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

qiaochuz-nv and others added 2 commits October 27, 2026 10:26
…ing judge reaches a verdict

The README's `gym env start` gave the judge `max_output_tokens=256`. The judge
is the policy model, so a reasoning policy can spend the whole budget reasoning
and stop `incomplete` before `[[A=B]]`/`[[A!=B]]`, which scores the rollout 0.
Raise the documented budget to 8192 (same value as text_to_sql, #5102) and add
an offline README-replay test that asserts the judge is `policy_model` with
budget 8192.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
Parse with offline=True so the config-only test probes no ports or hosts,
sets up no exporters, and leaves UV_CACHE_DIR/UV_LOCK_TIMEOUT unset in
os.environ. Assertions are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: qiaochuz <[email protected]>
@qiaochuz-nv
qiaochuz-nv force-pushed the qiaochuz/reg-20261026-equivalence-llm-judge-judge-budget branch from 446d681 to 2b47d62 Compare October 27, 2026 17:28
@qiaochuz-nv

Copy link
Copy Markdown
Contributor Author

/ok to test 2b47d62

@weijiac0619
weijiac0619 added this pull request to the merge queue Oct 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

Merged via the queue into main with commit 837ce27 Oct 28, 2026
54 of 57 checks passed
@weijiac0619
weijiac0619 deleted the qiaochuz/reg-20261026-equivalence-llm-judge-judge-budget branch October 28, 2026 19:37

This branch was previously deployed

1 inactive deployment
public — 2b47d62c Deployed Oct 27, 2026 by copy-pr-bot[bot] via release / finalize / notify #7648
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 complexity:low Localized change in one scope with a small, straightforward review surface docs Documentation-only updates or documentation debt needs-review PR is ready for code review and waiting on a reviewer QA_fix Fix implemented by a QA team member sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants