Repository navigation
fix(equivalence_llm_judge): raise the README judge budget so a reasoning judge reaches a verdict - #5110
Conversation
|
/ok to test 446d681 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
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.
…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]>
446d681 to
2b47d62
Compare
|
/ok to test 2b47d62 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40748504609 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/40750166755 |
What does this PR do?
Makes the
equivalence_llm_judgeREADME launch give the judge enough output tokens to reach a verdict. The README'sgym env startsetjudge_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 stopincompletebefore 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 fortext_to_sql.Found while checking other READMEs for the
text_to_sqljudge-budget problem (#5102); no NVBug filed.Cause
resources_servers/equivalence_llm_judge/README.md:90passesmax_output_tokens=256to the judge, andconfigs/equivalence_llm_judge.yamlsetsjudge_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_verdictreturnsverdict_label=Nonewithjudgement_parsing_issues: [truncated_judge_output, no_verdict](app.py:97-125), andverifyscores the rollout 0.0. The parsing and scoring are correct; only the documented budget is too small.Fix
gym env startjudge override is nowmax_output_tokens=8192, with one sentence saying why (the judge is the policy model, and a reasoning model can need thousands of tokens before the verdict).tests/unit_tests/test_equivalence_llm_judge_readme_config.py: an offline README-replay test modeled ontest_terminus_judge_readme_config.py(fix(terminus_judge): define the judge server the README launch needs #4557) and fix(text_to_sql): raise the README judge budget so a reasoning judge reaches a verdict #5102's test. It runs the README'sgym env startblock through the real CLI with dispatch intercepted, resolves the config with the parser'soffline=True(no port, host, or exporter probes) and placeholder endpoints (noenv.yaml/dotenv), and asserts the judge ispolicy_modelwith budget 8192.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:On the same main, a QA run of the README flow:
gym env startwith the README's overrides taken verbatim from the checkout's README,gym eval runon the 5 shipped examples × 4 repeats, then 10 live/verifycontrols (each row's gold answer, and\boxed{42}). Policy and judge: a reasoning model (nvidia/nvidia/nemotron-3.5-super-vl-preview).After the fix
Gym
446d68104(this branch, on main59406c7b5):The same QA run, now reading 8192 from the branch README:
Validation
59406c7b5, 15/30 judge calls starved at 256 and 8/20 rollouts scored 0 with no verdict; after on446d68104, 0/30 starved, 20/20 rollouts 1.0, controls 10/10 graded correctly. Earlier runs on main74030391e: 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.2b47d62c7is rebased on main7520cf42d; its README change is identical to446d68104, the head the QA runs used. The replay test parses withoffline=True(review suggestion): it passes with_find_open_port_using_range,setup_exporters,socket.gethostbynameandsocket.bindpatched 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=trueintest_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.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 readsjudge_prompt_template_fpath); the key is accepted and ignored, and the judge uses the shippedprompt_templates/equivalence_llm_judge.txt. That is a separate docs question.🤖 Generated with Claude Code