Repository navigation
Conversation
…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>
Contributor
Author
|
/ok to test 73a2a3c |
Contributor
|
🌿 Preview your docs: https://nvidia-preview-pr-6673-73a2a3ca0a16.docs.buildwithfern.com/nemo/gym |
…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>
Contributor
Author
|
/ok to test 1536fe3 |
…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>
…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>
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>
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>
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>
Contributor
Author
|
/ok to test a5b89da |
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>
7 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: trueand afailure_kind(judge_failed,judge_unparseableorverifier_error). Ajudge_failedorjudge_unparseablerow goes to the failures sidecar, andgym eval reverify --judge-failed-onlyjudges it again from the saved answer. Averifier_errorrow (math_with_judgewithout a judge,ether0, andequivalence_llm_judgewithoutexpected_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_ifchange onto theinverse_ifserver on main, and the review fixes in the last seven commits. Theopencode_multimodal_benchmarkstest 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_failsafemasks the row under that kind, and recovery judges it again.judge_failsafe(verify_fn, *, placeholder_reward=0.0)andSimpleResourcesServer.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
abstentionC: NOT_ATTEMPTEDgraded CORRECT. A reply without a grade scored INCORRECT. A cut reply was graded from its text. The judge graded an empty final answer.judge_unparseable). An empty final answer scores INCORRECT without a judge call.genrm_comparedefault_score(3.0 by default), the score that an unparseable verdict already gets. They stay masked.math_with_judge[[A=B]]or[[A!=B]], or cut off at the judge output limit, scored 0. A math-verify timeout, crash or exception scored 0.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.polymathandmath_tool_rewardsinherit this.physics_judge,ugphysics_judgeandmath_with_autograderkeep their own grading.equivalence_llm_judge(alsolc_judge)expected_answerwas judged against an empty string.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 withoutexpected_answeris masked (verifier_error) without a judge call.ether0OracleError, a solution that does not parse, or an unknown eval function scored 0.verifier_error).jailbreak_detection_request_judgecaught every judge failure and returned the "unclear" reward (0.0 forsafety_check). A complete reply without a verdict label also got that reward.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 hasreward_if_unclear. A configuration that sets it still loads, and the server ignores the key.multichallenge[[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.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_verdictreturned 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.fail_on_unparseable_judge_response, defaults totrue, so such a reply, or a reply cut at the judge's output limit, is masked (judge_unparseable). Set it tofalseto 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_ifkeyword fallbackWhen a judge reply has no JSON verdict,
_extract_verdictreads PASS or FAIL from its last lines. It tested"PASS" in linebefore 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 realinverse_ifrows 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" (167inverse_ifreplies at638bdb56b9), 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 167inverse_ifreplies at0495436970used 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:
env.should_mask_flagged_samplesis on, which is its default.default_scoreforgenrm_compare. Under NeMo RL's defaultgrpo.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) addsexclude_infra, which leaves rows with these kinds out of the group statistics. On NeMo RL main today,grpo.masked_reward_policy: excludekeeps these rows out of the group statistics. Underinclude, the effect is largest forinverse_ifandmultichallenge: 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_ifnow defaultsfail_on_unparseable_judge_responsetotrue. Before,inverse_ifhad no such field and always scored FAIL.abstention,multichallengeandinverse_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_failedandjudge_unparseablerows go to<output>_failures.jsonl. Averifier_errorrow 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 maskedinverse_iformultichallengerow counts 0.0, and a maskedgenrm_comparerow counts 3.0, whichpass_kcounts as a pass. The configs that use these servers:aime24,aime24-x,aime25,aime25-x,aime26,apex25,apex_shortlist,gsm8k,hendrycks_math,hmmt_feb25,hmmt_nov25,indic/aime_2026,indic/math_500,math-500math_with_judge, judge offpolymathpolymath(inheritsmath_with_judge), judge offarxivmath_0526,arxivmath_0626math_with_judge, judge onfinancebench,hle,hle_diamond,hle_verified,secqueequivalence_llm_judgeexpected_answer, leave the aggregate instead of counting as 0.ether0ether0resources_servers/equivalence_llm_judge/configs/nl2bash-equivalency.yaml(verified: true)equivalence_llm_judgenemotron_3.5_super/reward_profiling,nemotron_3.5_super/batch_configs,nemotron_3.5_super/benchmark_configsabstention,multichallenge,inverse_if,math_with_judge,equivalence_llm_judge,ether0abstentionprofile also changes because the parser reads only grades that the judge gave (C: NOT_ATTEMPTEDno longer grades CORRECT), and an empty answer no longer gets the abstention reward.No config under
benchmarks/usesgenrm_compareorjailbreak_detection.nl2bash-equivalency.yamlis the oneverified: trueconfiguration whose grading changes.Compatibility
judge_failsafegets a keyword-onlyplaceholder_rewardwith default 0.0.SimpleResourcesServer.judge_failure_reward()returns 0.0 unless a server overrides it. In this PR, onlygenrm_compareoverrides it.JudgeErrorwithoutfailure_kindbehaves as before.is_judge_failurenow also accepts a resources server event with kindjudge_unparseable. No server on main raises one today.inverse_ifgets the config fieldfail_on_unparseable_judge_response. To keep the old FAIL score, set it tofalse.jailbreak_detectionno longer hasreward_if_unclear. A configuration that sets it still loads, and the server ignores the key.Related PRs and merge order
JudgeErrorkind change.C: NOT_ATTEMPTEDbug inabstentionwith another parser and keeps the INCORRECT fallback. It conflicts with this PR inresources_servers/abstention/(4 hunks). This PR also fixes that bug and masks a reply without a grade. If this PR merges first, fix(abstention): match standalone judge grades #5403 can close. Its tests and README keep the INCORRECT fallback that this PR replaces: 12 of its 22test_grade_tokenscases, itstest_fallback_to_btest and 4 of its 8test_verify_grade_tokenscases expect other results at this head.genrm_comparecomparison. It merges with this PR without conflicts. After both merge, those masked rollouts carrydefault_scoreinstead of 0.0. The shared test helperassert_judge_failureintest_http_lifecycle.pyexpects that value after this PR.math_with_judgelast boxed answer) conflicts with this PR in one hunk ofresources_servers/math_with_judge/tests/test_app.py: a call that this PR givesraise_on_failure=True. Whichever PR merges second needs a one-line rebase.text_to_sql,labbench2_vlmandmath_with_autograder) shares no files with this PR.math_with_autograderkeeps its own grading here.tavily_search) and fix(opencode_search,browsecomp_advanced_harness): parse markdown-emphasized judge verdicts #6263 (opencode_search,browsecomp_advanced_harness) share no files with this PR. fix(tavily_search): parse markdown-emphasized judge verdicts, mask unparseable ones #6260 masks a reply without a verdict through a plainJudgeError. After feat(verification): let a JudgeError name its failure kind and a server choose its placeholder reward #6675, it can namejudge_unparseable.resources_servers/jailbreak_detection/(4 hunks inapp.py, 1 intests/test_app.py). Its test that expects reward 0.25 after a judge failure fails with this PR's code. Whichever PR merges second drops the jailbreak hunks of feat: record rollouts that were scored despite a failure #6393 and that test. Draft feat(verifiers): enforce math and STEM answer-format contracts #6525 conflicts with this PR in one hunk ofmath_with_judge/app.py. Its new answer-format path calls math-verify withoutraise_on_failure=True, so a math-verify failure there still scores 0. Whichever PR merges second passesraise_on_failure=Trueon that path too.opencode_multimodal_benchmarkstest fix, because this PR breaks that test without it.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).
opencode_multimodal_benchmarksbuilds amath_tool_rewardsserver intest_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 onmainatd711cd1577in this environment, because they need packages or services that the local dev environment does not have, for exampleopensandbox,mlflow,tenacityandcloudpickle. 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_ifandjailbreak_detection(4 paths), the twojailbreak_detectiontests that keep a known zero, and 5 of the firstinverse_iftests.Merge check: with #5330 merged on top of the branch before the review fixes,
ng_test +entrypoint=resources_servers/genrm_comparegave 414 passed. The review fixes change only thegenrm_compareREADME.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).main, the judge graded the empty answer and paid it:abstention18 rows at 0.5 (NOT_ATTEMPTED),multichallenge6 andinverse_if3 rows at 0.125 to 1.0.judge_unparseable. 9inverse_ifrows have a reply in another score format. In 7 of them,mainread PASS or FAIL from inside a word such as "passed" or "fails". 1multichallengereply gave its verdict in another language, and 1jailbreak_detectionreply 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) andether0(88 rows) did not change.example_rollouts.jsonlfiles parse the same atmainand at this head.Issue
No issue. Each commit message names the bug that it fixes.
🤖 Generated with Claude Code