Repository navigation
fix(text_to_sql): raise the README judge budget so a reasoning judge reaches a verdict - #5102
Conversation
|
/ok to test a16ce29 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP — LGTM — no reliability concerns.
Reviewed both changed files and traced CLI configuration resolution through judge request forwarding. The README override reaches the configured policy-model judge without changing policy-generation defaults. The regression test follows the existing replay pattern and checks the resolved budget and judge wiring.
Static review only; tests and live rollouts 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]>
…ing judge reaches a verdict (NVIDIA-NeMo#5110) * fix(equivalence_llm_judge): raise the README judge budget so a reasoning 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, NVIDIA-NeMo#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]> * test(equivalence_llm_judge): resolve the README replay config offline 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]> --------- Signed-off-by: qiaochuz <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…reaches a verdict The README's `gym env start` gave the judge `max_output_tokens=512`. The judge is the policy model (`configs/text_to_sql.yaml` sets `judge_model_server.name: policy_model`), so with a reasoning model as the policy the judge calls stopped `incomplete` on the 512-token budget before they wrote the `[[A=B]]`/`[[A!=B]]` marker: verdict None, reward 0, and the `check_twice_swap` second judge never ran. Following the README on the five shipped examples scored 0 on every row with no verdict. Raise the documented budget to 8192. terminus_judge went to 4096 for the same reason (#4557), but here 2 of 19 rollout judge calls still ran out at exactly 4096 while completed calls reached 3783 tokens; at 8192 every call reached a verdict (largest 3500). Add `tests/unit_tests/test_text_to_sql_readme_config.py`, an offline README-replay test modeled on `test_terminus_judge_readme_config.py`: it runs the README `gym env start` block through the real CLI with dispatch intercepted, resolves the config offline with placeholder endpoints (no env.yaml/dotenv), and asserts the judge is the policy model and the budget is 8192. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: qiaochuz <[email protected]>
a16ce29 to
2ad2c7c
Compare
|
/ok to test 2ad2c7c |
yaoyu-33
left a comment
There was a problem hiding this comment.
LGTM. The README budget override reaches both judge calls without changing policy-generation settings. All 22 focused tests passed.
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/44383445064 |
What does this PR do?
Makes the
text_to_sqlREADME launch give the judge enough output tokens to reach a verdict. The README'sgym env startsetjudge_responses_create_params.max_output_tokens=512. The judge is the policy model, so when the policy is a reasoning model, the judge spends all 512 tokens reasoning and stopsincompletebefore it writes[[A=B]]or[[A!=B]]. Following the README on the five shipped examples then scores every row 0 with no verdict, and thecheck_twice_swapsecond judge almost never runs. This PR raises the documented budget to 8192.Found by the NeMo Gym QA regression (QA case
text_to_sql); no NVBug filed.Cause
resources_servers/text_to_sql/README.md:74has passedmax_output_tokens=512to the judge since the server was added in #648, andconfigs/text_to_sql.yamlsetsjudge_model_server.name: policy_model. A judge reply cut off at the budget carries no marker, so_generate_judge_evaluationleavesverdict_label=None(app.py:397-414).verifythen recordsjudge_evaluation_failedwith reward 0.0 (app.py:312-313), and the swap judge, which only runs after a first[[A=B]](app.py:288), is skipped. 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 needs thousands of tokens before the verdict).tests/unit_tests/test_text_to_sql_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). It runs the README'sgym env startblock through the real CLI with dispatch intercepted, resolves the config offline with placeholder endpoints (noenv.yaml/dotenv), and asserts the judge ispolicy_modelwith budget 8192.Why 8192 and not 4096, the value #4557 used for
terminus_judge: at 4096 the QA case passed, but 2 of 19 README-rollout judge calls still stoppedincompleteat exactly 4096 (completed calls reached 3783 tokens). At 8192 every judge call reached a verdict across two runs; the largest used 4086 tokens.Before the fix
Gym
45ceac060(main), offline test from this branch:On the same main, the QA case
text_to_sqlruns the README stack (gym env startwith the README overrides,gym eval runon the five shipped examples) with a reasoning model as policy and judge, then sends 15 live verifier controls (5 identical SQL, 5 different SQL, 5 no SQL):(An earlier run on
494528232failed the case outright:dual_judge_controls: 0,unparsed_judgments: 9.)After the fix
Gym
a16ce2911(this branch, on main74030391e). The QA run used the same change on main45ceac060; the two main commits since touch only CI review and sandbox code:QA case
text_to_sql, same flow with the README's 8192 budget:Validation
text_to_sql: before (512) all README rollouts scored 0 with no verdict; after (8192) 1/1, all 24 judge calls reached a verdict. Also run at 8192 a second time (all verdicts, max 3500 tokens) and twice at 4096 (2 of 19 rollout judge calls starved at 4096).pytest tests/unit_tests/test_text_to_sql_readme_config.py: fails on main (512 == 8192), passes on this branch.pytest resources_servers/text_to_sql/tests: 21 passed.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 costs more per call but returns a verdict. Not changed here: a judge reply with no verdict is still scored as an unmasked reward 0 (
app.py:312-313); masking it is a separate decision.🤖 Generated with Claude Code