Skip to content

fix(verification): mask judge replies without a verdict, not score them 0 - #6673

Open
yfw wants to merge 22 commits into
yifuw/judge-error-failure-kindfrom
yifuw/mask-judge-replies-without-verdict
Open

yfw wants to merge 22 commits into
yifuw/judge-error-failure-kindfrom
yifuw/mask-judge-replies-without-verdict

Conversation

@yfw

@yfw yfw commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Several resources servers scored a row 0, or a fixed fallback grade, when the judge gave no verdict or the judge call failed. In training, that row was trained as if the policy failed. In evaluation, it counted as a wrong answer. This PR masks those rows instead. A masked row has mask_sample: true and a failure_kind (judge_failed, judge_unparseable or verifier_error). A judge_failed or judge_unparseable row goes to the failures sidecar, and gym eval reverify --judge-failed-only judges it again from the saved answer. A verifier_error row (math_with_judge without a judge, ether0, and equivalence_llm_judge without expected_answer) stays in the rollouts file as a masked row. Recovery does not grade it again, and the acceptance gate reports such a run as not complete.

A wrong answer, a missing answer and a parsed negative verdict still score 0 and stay in training. So does an answer too long for the judge's context window: the judge server refuses that prompt, and the reply is cut before any output token.

These changes were written by Jiaqi Zeng (@HeyyyyyyG). New in this PR: the port of the inverse_if change onto the inverse_if server on main, and the review fixes in the last seven commits. The opencode_multimodal_benchmarks test fix is Jiaqi's commit from #6676.

Core (in #6675)

This PR stacks on #6675. That PR adds the two core options that these servers use:

  • JudgeError(..., failure_kind="judge_unparseable"): judge_failsafe masks the row under that kind, and recovery judges it again.
  • judge_failsafe(verify_fn, *, placeholder_reward=0.0) and SimpleResourcesServer.judge_failure_reward(): a server can choose the placeholder reward on its masked rows.

This branch has the core commit first and a merge of the #6675 branch, so its diff against #6675 shows only the server changes. Merge #6675 first.

Servers

Server Before Now
abstention A reply that was not a bare letter matched any capital A, B or C, so C: NOT_ATTEMPTED graded CORRECT. A reply without a grade scored INCORRECT. A cut reply was graded from its text. The judge graded an empty final answer. The parser reads a leading letter (also in bold, quotes or brackets), a stated grade ("The grade is B", not the article in "a clear B") or a single label word that is not negated. A reply that names two different labels has no grade. A reply without a grade, or cut at the judge's output limit, is masked (judge_unparseable). An empty final answer scores INCORRECT without a judge call.
genrm_compare The masked rows of a cohort that the judge failed to score carried reward 0.0. A burst of judge failures looked like a drop in the mean GenRM reward. The masked rows carry default_score (3.0 by default), the score that an unparseable verdict already gets. They stay masked.
math_with_judge A judge reply without [[A=B]] or [[A!=B]], or cut off at the judge output limit, scored 0. A math-verify timeout, crash or exception scored 0. Such a judge reply is masked (judge_unparseable). A reply cut before any output token (a refused prompt) still scores 0. When math-verify fails, the server checks that it still grades the gold against itself. If it does, the answer caused the failure and scores 0. If not (a bad gold or a broken library), the row is masked (verifier_error) without a judge, and with a judge the judge grades in its place. polymath and math_tool_rewards inherit this. physics_judge, ugphysics_judge and math_with_autograder keep their own grading.
equivalence_llm_judge (also lc_judge) A judge pass without a verdict label scored 0 or went to the rescue pass. A cut-off reply kept any label it held. A row without expected_answer was judged against an empty string. The first and swap passes mask the row when the reply is cut off or has no label (judge_unparseable). A reply cut before any output token (a refused prompt) scores not equal. A rescue pass without a verdict keeps the first pass's 0. A row without expected_answer is masked (verifier_error) without a judge call.
ether0 A grader exception other than OracleError, a solution that does not parse, or an unknown eval function scored 0. Each of these is masked (verifier_error).
jailbreak_detection _request_judge caught every judge failure and returned the "unclear" reward (0.0 for safety_check). A complete reply without a verdict label also got that reward. The judge call goes through call_judge, so 408, 429 and 5xx replies, timeouts and lost connections are retried. A call that still fails, a reply without text, a cut-off reply (even one that holds a label) and a reply without a label are masked. When a product reward already has a factor of 0 (UNSAFE), a judge failure on another factor keeps the 0. A reply cut before any output token (a refused prompt) scores as unsafe or low quality. The server no longer has reward_if_unclear. A configuration that sets it still loads, and the server ignores the key.
multichallenge A reply without [[YES]] or [[NO]] read as NO, and the fallback matched NO inside NOT, CANNOT or UNKNOWN. Every rubric item whose pass criterion is NO passed. The judge graded an empty final answer. Only a last line that is the bare verdict counts. Any other reply, and a reply cut at the judge's output limit, is masked (judge_unparseable). A reply cut before any output token (a refused prompt) fails the item. An empty final answer scores 0 without a judge call.
inverse_if _extract_verdict returned FAIL for a reply without a verdict. Its keyword fallback read PASS inside any word ("passenger", "passport", "passing", "passed"). The judge graded an empty final answer. A new config field, fail_on_unparseable_judge_response, defaults to true, so such a reply, or a reply cut at the judge's output limit, is masked (judge_unparseable). Set it to false to keep the FAIL score. A reply cut before any output token (a refused prompt) receives FAIL. The keyword fallback reads only the whole word PASS or FAIL in capitals, and a line that names both is no verdict. An empty final answer scores 0 without a judge call.

inverse_if keyword fallback

When a judge reply has no JSON verdict, _extract_verdict reads PASS or FAIL from its last lines. It tested "PASS" in line before FAIL, so "C1 fails because no passenger capacity is given. C2 fails. The response scores 0." read as PASS (score 1.0). In an interim count of the replay of real inverse_if rows with a hosted judge (177 judge replies), 41 replies used this fallback, and 15 of those 41 got PASS only from a word that contains PASS. In the final replay sample under "Rollout evidence" (167 inverse_if replies at 638bdb56b9), 31 replies used the fallback, and 14 of its 27 fallback PASS grades came only from such a word. The fallback now reads only the whole word PASS or FAIL, latest line first. A line that names both words is ambiguous, so the reply has no verdict and the row is masked. The match is also case-sensitive: a lowercase or mixed-case word ("Since 5 of 6 criteria pass", "Result: Pass") is prose, not a verdict. In the final replay sample, 37 of the 167 inverse_if replies at 0495436970 used the fallback. 11 of them got their verdict only from a lowercase word, and 2 of those 11 contradicted what the reply said about the asked criterion. No row outcome changes in that sample, because those rows are masked by other replies.

Why

A judge reply without a verdict measures nothing about the answer. A 0 for it trains the policy against a judge failure, and it lowers benchmark scores for a reason outside the model. A masked row keeps the saved answer, so recovery can judge it again.

Benchmark and training effect

Training:

  • Rows that got 0, the unclear reward, FAIL or NO after a judge failure or a reply without a verdict are now masked. NeMo RL leaves a masked row out of the loss when env.should_mask_flagged_samples is on, which is its default.
  • A masked row still carries a placeholder reward: 0.0, or default_score for genrm_compare. Under NeMo RL's default grpo.masked_reward_policy: include, that placeholder still counts in its group's baseline and standard deviation. feat(grpo): add exclude_infra masked-reward policy for infra-masked rollouts RL#4968 (open) adds exclude_infra, which leaves rows with these kinds out of the group statistics. On NeMo RL main today, grpo.masked_reward_policy: exclude keeps these rows out of the group statistics. Under include, the effect is largest for inverse_if and multichallenge: one rubric item without a verdict puts 0.0 for the whole row into its group's baseline. In one example with 8 rollouts, the advantage of the worst real answer moves from -2.45 to -0.32.
  • inverse_if now defaults fail_on_unparseable_judge_response to true. Before, inverse_if had no such field and always scored FAIL.
  • In abstention, multichallenge and inverse_if, an empty final answer scores 0 without a judge call and stays in training. Before, the judge sometimes gave it the abstention reward, or passed rubric items that only forbid something.

Evaluation: a masked row leaves the aggregate. Only the judge_failed and judge_unparseable rows go to <output>_failures.jsonl. A verifier_error row stays in the rollouts file as a masked row. In Gym's evaluation, when no reward is below 0, removing a row that scored 0 can only raise or keep a mean score. A cut-off judge reply that held a label used to be graded by that label, sometimes 1.0, so on configurations with a judge a mean can also go down. NeMo RL validation averages every row's reward, placeholders included. There a masked inverse_if or multichallenge row counts 0.0, and a masked genrm_compare row counts 3.0, which pass_k counts as a pass. The configs that use these servers:

Benchmark configs Server What changes in the numbers
aime24, aime24-x, aime25, aime25-x, aime26, apex25, apex_shortlist, gsm8k, hendrycks_math, hmmt_feb25, hmmt_nov25, indic/aime_2026, indic/math_500, math-500 math_with_judge, judge off A math-verify failure that also fails on the gold (a bad gold or a broken library) leaves the aggregate instead of counting as wrong. A failure caused by the answer still counts as wrong. Scores change only where such failures happened.
polymath polymath (inherits math_with_judge), judge off Same as the row above.
arxivmath_0526, arxivmath_0626 math_with_judge, judge on A judge reply without a verdict, or cut off, leaves the aggregate instead of counting as wrong.
financebench, hle, hle_diamond, hle_verified, secque equivalence_llm_judge A judge reply that is cut off or has no verdict, and a row without expected_answer, leave the aggregate instead of counting as 0.
ether0 ether0 Grader exceptions and rows without a usable solution leave the aggregate.
resources_servers/equivalence_llm_judge/configs/nl2bash-equivalency.yaml (verified: true) equivalence_llm_judge A first or swap judge reply that is cut off or has no label is masked instead of scoring 0, so the verified baseline can change.
nemotron_3.5_super/reward_profiling, nemotron_3.5_super/batch_configs, nemotron_3.5_super/benchmark_configs abstention, multichallenge, inverse_if, math_with_judge, equivalence_llm_judge, ether0 The reward profiles count fewer zeros from judge failures and more masked rows. The abstention profile also changes because the parser reads only grades that the judge gave (C: NOT_ATTEMPTED no longer grades CORRECT), and an empty answer no longer gets the abstention reward.

No config under benchmarks/ uses genrm_compare or jailbreak_detection. nl2bash-equivalency.yaml is the one verified: true configuration whose grading changes.

Compatibility

Related PRs and merge order

Suggested order: #6675 first, then this PR. Then #5919 with a one-line rebase, and #5403 closes. #5330, #5923, #6260 and #6263 can merge in any order.

Validation

All runs used Python 3.13.14 on CPU, at the head of this branch (with the review fixes).

pre-commit run --all-files
# passed (every hook)

pytest tests/unit_tests/verification
# 94 passed

ng_test +entrypoint=resources_servers/<server> +should_validate_data=true
# abstention 43 passed, genrm_compare 394 passed, math_with_judge 145 passed,
# equivalence_llm_judge 221 passed, ether0 128 passed (4 skipped), jailbreak_detection 68 passed,
# multichallenge 26 passed, inverse_if 39 passed. Example data validated for each.
# Servers that reuse the changed ones: polymath 10, math_tool_rewards 16, physics_judge 31,
# ugphysics_judge 23, math_with_autograder 27, llm_judge_tool_rewards 85 passed.
# opencode_multimodal_benchmarks: 645 passed, 17 skipped.

opencode_multimodal_benchmarks builds a math_tool_rewards server in test_math_judge_records_final_shaped_grade. PR CI does not run it, because that folder does not change. Without the test fix from #6676, 9 of its 18 cases fail on this branch.

Before the review fixes, the full core run (pytest tests/unit_tests -n 8) gave 25155 passed, 127 failed (125 tests and 2 subtests) and 10 errors. The same tests also fail on main at d711cd1577 in this environment, because they need packages or services that the local dev environment does not have, for example opensandbox, mlflow, tenacity and cloudpickle. The review fixes change only resources servers, their tests and docs.

The new tests fail without the code change. Examples: the refused-prompt tests in equivalence_llm_judge, math_with_judge, multichallenge, inverse_if and jailbreak_detection (4 paths), the two jailbreak_detection tests that keep a known zero, and 5 of the first inverse_if tests.

Merge check: with #5330 merged on top of the branch before the review fixes, ng_test +entrypoint=resources_servers/genrm_compare gave 414 passed. The review fixes change only the genrm_compare README.

Rollout evidence

Replay of real judge replies (C8). 796 training rows of the 8 changed server configurations, with answers mostly from hosted Nemotron models. One hosted LLM judge used the training judge settings (65,536-token cap, temperature 1.0) and gave 900 replies. Each reply was saved once and then graded by main (a9e73574a2) and by this head (0495436970).

  • 758 of 796 rows got the same outcome. No masked row was unmasked, and no row changed its failure kind.
  • 27 rows had an empty final answer and now score 0 without a judge call. At main, the judge graded the empty answer and paid it: abstention 18 rows at 0.5 (NOT_ATTEMPTED), multichallenge 6 and inverse_if 3 rows at 0.125 to 1.0.
  • 11 rows are newly masked as judge_unparseable. 9 inverse_if rows have a reply in another score format. In 7 of them, main read PASS or FAIL from inside a word such as "passed" or "fails". 1 multichallenge reply gave its verdict in another language, and 1 jailbreak_detection reply was cut at its output cap.
  • equivalence_llm_judge (both configurations, 132 judged rows), math_with_judge (43 judged rows, and 149 rows with the judge off) and ether0 (88 rows) did not change.
  • No judge reply was cut before its first output token, so the refused-prompt rule did not apply in this sample.
  • The 27 judge replies saved in the committed example_rollouts.jsonl files parse the same at main and at this head.
  • The fallback then became case-sensitive. In this sample, 11 replies lose a verdict taken only from a lowercase word (2 of them contradicted the reply), and no row outcome changes.

Issue

No issue. Each commit message names the bug that it fixes.

🤖 Generated with Claude Code

HeyyyyyyG and others added 10 commits November 23, 2026 14:59
…wer as incorrect

The fallback 'letter in text' matched any capital A, so "C: NOT_ATTEMPTED" graded CORRECT. A reply that is not a bare
letter is now read only from a leading letter, a stated grade, or the last label word. An empty final answer scores
incorrect without a judge call instead of likely earning the abstention reward.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…g it INCORRECT

Before: parse_judge_grade fell back to "B" (INCORRECT) for a judge reply with
no A/B/C grade it could read, so the row was trained at incorrect_reward (0.0).

Now: parse_judge_grade returns None for such a reply and verify raises
JudgeError(judge_unparseable); judge_failsafe turns it into a masked row routed
to the failures sidecar. An empty judge reply already masked (judge_failed)
and is unchanged; an empty policy answer still scores INCORRECT without a judge
call and stays trained.

Tests: resources_servers/abstention/tests (41 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…al default_score

judge_failsafe hard-coded the masked row's placeholder reward to 0.0. For
genrm_compare, a cohort that exhausts its judge retries had every member logged
at reward 0 while a scored cohort averages around default_score (3.0), so a
burst of judge failures read as a drop in the mean GenRM reward although no
masked row trains.

judge_failsafe takes a keyword-only placeholder_reward (default 0.0, every
other server unchanged); SimpleResourcesServer passes judge_failure_reward(),
which genrm_compare overrides to config.default_score, the score an
unparseable verdict and a singleton cohort already get. Masking, failure
routing and the sidecar row are unchanged.

Tests: tests/unit_tests/verification (all pass) and
resources_servers/genrm_compare/tests (485 passed together).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…erify failures

A judge reply that names neither [[A=B]] nor [[A!=B]] (only reasoning, a
refusal, empty or unlabelled text, no output) was scored as unequal, so the
row was trained as reward 0. A reply cut at the judge's own output limit was
parsed like a complete one. Both now raise JudgeError(judge_unparseable):
judge_failsafe masks the row and routes it to the failures sidecar, where
recovery re-judges it from the saved answer.

math-verify failures (the 10 s child-process deadline, a crashed child, an
exception or TimeoutException escaping math_metric, e.g. an expected answer
it cannot parse) returned (0.0, None). With should_use_judge the judge
already grades the answer in math-verify's place, which is unchanged; without
a judge the row was trained as 0 and is now masked as verifier_error.

Unchanged: no \boxed / no answer candidate and wrong answers are still
trained as 0. Subclasses that grade with their own _verify_answer
(physics_judge, ugphysics_judge, math_with_autograder) keep the 0.0 from
_verify_answer_with_library_async; polymath and math_tool_rewards inherit
the new behaviour.

Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…erdict

A judge reply with no verdict label (no_verdict, unparseable_judge_output)
was treated as not equal: the row was trained as reward 0, or went to the
full-generation rescue pass. A reply cut at the judge's own output limit
(status incomplete) kept whatever label it held, and without one scored 0.
Every judge pass whose verdict the grade uses (first, rescue and swap passes)
now goes through _judge_verdict, which raises JudgeError(judge_unparseable)
for those replies: judge_failsafe masks the row and routes it to the
failures sidecar for re-judging. lc_judge runs on this server and gets the
same behaviour.

A row without its expected_answer was judged against an empty string and
trained as 0; it is now masked as verifier_error without calling the judge.

Unchanged: empty_final_answer and final_answer_too_long are still trained
as 0, and a parsed [[A!=B]] (or conflicting labels, last wins) still scores
0. _generate_judge_evaluation still returns its parse with diagnostics, so
subclasses that check it themselves (llm_judge_tool_rewards) keep their
own JudgeError.

Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
An exception raised by a reward function other than OracleError (a
malformed answer_info, a remote oracle client's transport error) was
logged and scored 0, so the row was trained as reward 0. The graders
score invalid and wrong answers 0 themselves (fuzzing them with
malformed SMILES, reactions and text raised nothing), so an exception
is the grader's own failure: it is now masked as verifier_error, like
the existing OracleError path.

A row whose solution string does not parse, or that names an eval
function the server does not have, has no usable expected-output spec;
it was scored 0 and is now masked as verifier_error.

Unchanged: no extractable answer, invalid molecules and wrong answers
are still trained as 0.

Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
… as the unclear reward

Before: _request_judge swallowed every judge transport, HTTP, JSON and schema
failure and returned (None, error); each verification path (policy-aware
verifiers, the legacy safety x quality flow, Nemotron mode) then scored the
row with its "unclear" reward (0.0 for safety_check in the live templates) and
it was trained. A judge reply with no message text (reasoning only, e.g. cut
at the judge's own max_output_tokens) took the same unclear path.

Now: _request_judge goes through call_judge, so 408/429/5xx replies, timeouts
and lost connections are retried and a call that still fails raises a
judge_failed event; a reply without message text, or a reply cut off
(incomplete_details set) before any label, raises JudgeError(judge_unparseable).
The base server's judge_failsafe turns both into a masked row
(mask_sample: true) routed to the failures sidecar.

Unchanged: an empty policy answer still scores 0 without a judge call, and a
complete judge reply that names neither label keeps the configured unclear
reward.

Tests: resources_servers/jailbreak_detection/tests (48 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…erdict label

Before (after the previous jailbreak_detection commit): a complete, non-empty judge reply naming neither of
its labels still scored the "unclear" reward and was trained. That applied to
the policy-aware verifiers (rewards.unclear, 0.0 for safety_check), the legacy
safety judge (reward_if_unclear), the legacy quality judge (fell back to
reward_if_quality_low) and the Nemotron judge (no "Response harm:" verdict).

Now: every such reply raises JudgeError(judge_unparseable) on all three scoring
paths; judge_failsafe turns it into a masked row routed to the failures
sidecar. The failure reason says whether the judge's own output limit cut the
reply. The unreachable unclear branches in the legacy flow are removed;
reward_if_unclear stays a config field (no longer read) so existing configs
still validate.

Unchanged: an empty policy answer still scores 0 without a judge call and is
trained; parsed SAFE/UNSAFE and per-verifier labels score as before.

Tests: resources_servers/jailbreak_detection/tests (50 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…defaulting it to NO

Before: _extract_verdict returned "NO" for a judge reply with neither
[[YES]] nor [[NO]], and its plain-text fallback matched "NO" as a substring of
the last line, so "NOT", "CANNOT", "UNKNOWN" or an empty reply (a judge cut
while reasoning) also read as NO. The row was trained, and every rubric item
whose pass criterion is NO passed on it.

Now: the fallback accepts only a last line that is the bare verdict
(optionally bracketed, emphasised or labelled, e.g. "**No**", "Verdict: yes");
any other reply raises JudgeError(judge_unparseable), which judge_failsafe
turns into a masked row. Judge transport failures already masked through
call_judge and are unchanged.

Also: an empty final answer (nothing left once reasoning is stripped) now
scores 0 without a judge call, as abstention and jailbreak_detection
already do. Judged, it passed NO-criterion items
(reward 1.0 on a single-item NO rubric). It stays trained (model's fault).

Tests: resources_servers/multichallenge/tests (22 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
Before: _extract_verdict returned FAIL for a judge reply with no PASS/FAIL
verdict (prose, or an empty reply from a judge cut while reasoning), so the
criterion scored FAIL and the row was trained at that score.

Now: _extract_verdict returns no verdict for such a reply, and a new knob,
fail_on_unparseable_judge_response (default true), raises
JudgeError(failure_kind=judge_unparseable); judge_failsafe turns it into a
masked row routed to the failures sidecar. Setting the knob to false keeps
the old FAIL scoring. A parsed FAIL verdict is unchanged and still trained.

Also: an empty final answer (nothing left once reasoning is stripped) now
scores 0 without a judge call, as abstention and jailbreak_detection
already do; judged, it could pass criteria that only
forbid something. It stays trained (model's fault).

Tests: resources_servers/inverse_if/tests (25 passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 23, 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.

@yfw yfw 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 labels Nov 23, 2026
@yfw

yfw commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 73a2a3c

@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 23, 2026 23:15
@github-actions

Copy link
Copy Markdown
Contributor

…eplies-without-verdict

Stack this branch on the core PR #6675, which adds the JudgeError
failure_kind and the judge_failsafe placeholder_reward that these
servers use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:high Autobot PR risk: high label Nov 23, 2026
@yfw
yfw changed the base branch from main to yifuw/judge-error-failure-kind November 23, 2026 23:21
@yfw

yfw commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 1536fe3

HeyyyyyyG and others added 3 commits November 23, 2026 16:59
…able math-judge reply

math_tool_rewards inherits math_with_judge's judge parsing, which now raises
JudgeError for a judge reply that is cut off or names no verdict (#6673).
Route the test through judge_failsafe, as the /verify route does, and assert
that those cases come back masked (judge_failed / judge_unparseable). Usable
verdicts are still graded and shaped as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jiaqi Zeng <jiaqiz@nvidia.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…e reply

The grade parser read grades that the judge never gave:
- The stated-grade rule ignored case, so the article in "a clear B" read as
  grade A. The letter is now case-sensitive, and "a" or "an" before it is
  skipped.
- A negated label ("not CORRECT", "isn't CORRECT") read as that label. It
  is now skipped.
- A reply that named two labels graded by the last one, so "INCORRECT. It
  would be CORRECT only if ..." graded A. A label now counts only when the
  reply names exactly one distinct label.
- A leading letter in bold, italics, code marks, quotes or brackets did not
  count. It does now.

A judge reply cut at its output limit was graded from its unfinished text.
_call_judge now raises JudgeError(judge_unparseable) for it, so the row is
masked, as math_with_judge and equivalence_llm_judge already do.

The README now gives the empty-answer and masking rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…e prompt as unsafe

- A row whose safety judge said UNSAFE was masked when another judge gave
  no verdict, so a harmful answer escaped its 0. When a product reward
  already has a factor of 0, a judge failure on another factor now keeps
  the 0. This covers the legacy safety x quality flow and the policy-aware
  verifiers under reward_combination product. A SAFE row still masks.
  gather now waits for every verifier, so no judge call keeps running.
- A reply cut before any output token means that the judge server refused
  the prompt for its length. A long jailbroken answer reaches this path.
  It now scores as the answer's failure (negative, unsafe or low quality)
  instead of a mask.
- A reply cut at the judge's output limit now masks even when it already
  holds a label, because the label can come from unfinished reasoning.
- The single safety judge path joins VERIFY_PATHS in the tests.
- reward_if_unclear is removed. The config ignores unknown keys, so a
  configuration that sets it still loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
yfw and others added 5 commits November 23, 2026 17:04
…the first pass 0 after a rescue without a verdict

- A reply cut before any output token means that the judge server refused
  the prompt for its length (vllm_model returns such a reply for a prompt
  longer than the judge's window). The policy controls the answer length,
  so the pass now scores not equal instead of masking the row.
- The rescue pass only adds partial credit to a first pass that said not
  equal. A rescue reply without a verdict now keeps the first pass's 0. A
  failed rescue call still masks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…udge prompt was refused

- A judge reply cut at its output limit was read for a draft verdict, so a
  cut reply could pass a rubric item. It now raises
  JudgeError(judge_unparseable) before the verdict is read.
- A reply cut before any output token means that the judge server refused
  the prompt for its length. The item now fails instead of masking the row.
  This check runs before the cut-reply check.
- Tests pin the end anchor of the bare verdict line ("Not enough
  information to decide." is no verdict).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…udge prompt was refused

- With fail_on_unparseable_judge_response (the default), a judge reply cut
  at its output limit now raises JudgeError(judge_unparseable) before the
  verdict is read. With the setting off, scoring is unchanged.
- A reply cut before any output token means that the judge server refused
  the prompt for its length. The criterion now receives FAIL, with the
  setting on or off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
… and a refused judge prompt 0

- With the judge off, a wrong answer that made math-verify time out (for
  example a large power tower) was masked as verifier_error. When
  math-verify fails, the server now checks that it still grades the gold
  against itself. If it does, the answer caused the failure and scores 0.
  A bad gold or a broken library still masks the row.
- A judge reply cut before any output token means that the judge server
  refused the prompt for its length. The answer now scores as not equal
  instead of masking the row. This check runs before the cut-reply check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
…ling manifests

- genrm_compare: the failsafe's placeholder reward is default_score, not
  0.0.
- The abstention notes in the reward-profiling manifests said that
  parse_judge_grade falls back to INCORRECT. A reply without a grade, or a
  cut reply, now masks the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@yfw

yfw commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c667ec0

…eplies-without-verdict

Bring in the #6675 review fixes: recovery plans a re-judge for a
judge_unparseable row, a counted judge failure counts as 0 whatever
placeholder it carries, and the docs for the new kind and placeholder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@yfw

yfw commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 638bdb5

…allback

The keyword fallback of _extract_verdict tested `"PASS" in line` before
FAIL on the last lines. So a reply whose last lines held "passenger",
"passport", "passing" or "0 out of 3 passed" read as PASS, and the
criterion scored 1.0. In a replay of real inverse_if judge replies, 41 of
177 replies used this fallback, and 15 of those got PASS only from such a
word.

The fallback now reads only the whole word PASS or FAIL, latest line
first. A line that names both words is ambiguous, so the reply has no
verdict and the row is masked, as for any reply without a verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@yfw

yfw commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 0495436

The keyword fallback matched PASS and FAIL in any case. A lowercase word
is prose ("Since 5 of 6 criteria pass") and can describe other criteria
than the one asked. In a replay of real inverse_if replies, 11 of the 37
replies that used the fallback got their verdict only from a lowercase
word, and 2 of those contradicted what the reply said about the asked
criterion. Only the whole word PASS or FAIL in capitals counts now, so
"Result: Pass" in mixed case also gives no verdict, and the row is masked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>
@yfw

yfw commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a5b89da

@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 25, 2026
yfw added a commit that referenced this pull request Nov 30, 2026
…placeholder

A masked member's reward is the judge-failure placeholder. It is 0.0 on main
today; once Gym #6675 and #6673 land it is the server's judge_failure_reward(),
which for genrm_compare is default_score (3.0 by default). The README now says
this in the failsafe paragraph, the Masking bullet and the consumer note.

The failed-comparison /run test also checks that each masked member carries
the server's placeholder: judge_failure_reward() where the server has it,
else 0.0, so the test holds in either merge order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yi-Fu Wu <yifu.wu@gmail.com>

This branch has not been deployed

No deployments
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 needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high 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