Repository navigation
fix(arena): count a judge game with no verdict as a failed rollout - #6371
Conversation
A content-filtered judge game repeats on every retry, so the row is now kept masked as arena:judge_content_filtered instead of a re-judgeable judge_failed. Token-cap, empty and label-less replies still raise JudgeError. Closes #6366 Signed-off-by: Wojciech Prazuch <[email protected]>
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
HOLD
The online aggregation path honors the new mask, but saved-rollout scoring and recovery do not consistently honor the terminal outcome. The inline findings cover those affected consumers.
RISK: Provide real rollout and before/after profiling evidence
The PR marks rollout evidence N/A and provides mocked judge-response tests, but this changes verification behavior for fixed evaluation benchmarks. The pinned rubric requires a before/after reward profile for that change, and the repository quality bar requires representative real smoke rollouts. The contribution guidance also distinguishes fixed benchmarks from training environments where profiling is optional.
Could you attach a representative real Arena rollout and a before/after profile using the same saved policy answers and judge configuration? Include the commands, sample count, artifact locations, mean/reward, win_rate*, and measured/masked counts. Expected acceptance: previously measurable judgments keep their rewards and scores; content-filtered judgments account for the intended coverage and completion change; unfiltered token-cap, empty and label-less judgments remain re-judgeable. Keep the new mocked regressions, since a live smoke run need not reliably reproduce provider filtering. This is a validation gap, not evidence that ordinary judgments changed.
I inspected all three changed files and their directly affected consumers. This was a static review; I did not execute tests. The PR reports 196 Arena tests passed.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Inline comments (escaped v1):
-
nemo_gym/eval/recovery/rows.pyline 345: ### RISK: Recovery still treats the terminal Arena exclusion as incompleteWith one scored row and one newly produced
mask_sample=true,failure_kind="arena:judge_content_filtered"row,decide_recoveryreaches this genericMASKEDbranch. The later handling returnsSTOPbecause the run is incomplete. RecoveryDecision.complete excludes masked identities, and the acceptance report reports them as errors. The Store counts the same row as settled, so collection can finish while recovery cannot recognize that finished Arena run.Correction: Could you give this explicit terminal exclusion a settled-but-unmeasured recovery representation and handle it consistently in
decide_recovery,RecoveryDecision.completeandgate_task_summary? It must not count as scored or require policy/judge retries. The shared representation needs an owner decision, so I am not suggesting an implementation patch.Preserve: Ordinary scored rows stay measured; infrastructure masks stay retryable or exhausted;
judge_failedstays judge-recoverable. Do not make all custom masks complete: the existing custom-mask test deliberately expects recovery to stop.Proposed acceptance: Persist a scored row and an actual filtered Arena result in a two-row Store. Expect no pending policy or judge work, recovery
action=noop,complete=true, one measured row and one terminal exclusion, with no incomplete-mask error. Separate leaf health limits may still reject the exclusion fraction. Retain tests where generic masks producestopand judge failures producereverify. Source reasoning only; I did not run these checks. -
resources_servers/arena/scripts/compute_rollout_scores.pyline 99: ### BLOCKER: Remove masked rows from offline score inputsThe new verifier saves filtered judgments in the main JSONL, but this loader includes them unchanged. The documented offline scorer calls
ArenaMetrics.computedirectly, bypassing shared mask filtering. One filtered row with a missing verdict plus one valid win raises at the default failure-rate limit. If that fraction is below the limit, or the limit is raised, the reward mean silently includes the placeholder zero. Two such rows report 50% instead of the measured 100%. The custom-taxonomy scorer shares this loader and also bypasses mask filtering.Correction: Exclude masked rows from the grouped measurement set after the existing identity/category/prompt validation. A suggested replacement for this line is:
if not rollout.get("mask_sample"): tasks[rollout["_ng_task_index"]].append(rollout)Keep an explicit error or coverage-only result when every row is masked; never publish a zero quality score for that input. Verify the suggestion before adopting it.
Preserve: Unmasked missing or invalid judgments must still reach the failure-rate guard. Keep v3/Vision generation-limit and reasoning-only zeros, valid ties, v2's
[[BB]]exclusion, and the loader's category and unmatched-prompt validation.Proposed acceptance: Save one actual filtered verify result beside one reward-1 win. Both offline commands should score only the win, without a parse/rollout failure; the standard command should print a 100% reward mean. An all-masked file must produce no quality score. An unmasked malformed judgment must still trip the configured failure limit. I did not execute these scripts.
-
resources_servers/arena/scripts/remove_failed_rollouts.pyline 41: ### RISK: Cleanup deletes the newly terminal filtered resultA new filtered row with a missing verdict returns
Truehere. The cleanup command then removes it from the main output, undoing the new keep-and-settle contract. Before this PR, that result went to the judge-failure sidecar; moving it into the main file exposes it to this consumer. Cleanup should remove retryable malformed judgments, not terminal exclusions.Correction: Add this narrow guard at the start of
is_failed_rollout:if row.get("mask_sample") is True and row.get("failure_kind") == "arena:judge_content_filtered": return False
Do not exempt every masked row, since other masks can represent infrastructure failures. Verify the suggested code before adopting it.
Preserve: Self-comparisons and v3/Vision generation-limit or reasoning-only zeros must still be kept. Ordinary unmasked missing-game, missing-verdict and empty-judge-output rows must still be removed. Retain the concrete outcomes in the existing cleanup tests.
Proposed acceptance: Pass actual filtered verify results through
is_failed_rollout, including either filtered ordering and a filtered-plus-token-cap pair; expectFalse. Clean a file containing a win, a terminal filtered row and an ordinary malformed judgment. Expect the first two rows kept byte-for-byte and only the malformed row removed. These checks are proposed, not executed. -
resources_servers/arena/scripts/fit_anchored_elo.pyline 170: ### BLOCKER: Honor the mask before building judge Elo observationsThe new branch masks a content-filtered response even when its partial text contains a parseable verdict, and it keeps both games. For example, judge texts
[[A>B]]and[[B>A]], with the first markedcontent_filter, now produce a masked Arena row with two verdicts.build_observationsignores the mask and turns that row into two policy wins, so the reported mean and fitted Elo silently include an outcome the verifier explicitly excluded. Checking only for missing verdicts does not enforce the new contract.Correction: In the judge-label branch, after the existing
v is Nonehandling and before readinggames, add:if v.get("mask_sample"): continue
This leaves the human-label branch untouched and excludes the entire masked battle, not only the filtered game. Verify this suggestion before adopting it.
Preserve: Unmasked current
gamesrows and legacygame0/game1rows must keep their position-swapped scoring. Keep rejection of incomplete verdict pairs and the version-specific[[BB]]behavior asserted by the existing Elo tests.Proposed acceptance: Produce the filtered-but-parseable row above and combine it with an unmasked tie against a fixed-Elo opponent. Judge observations should contain only
[0.5, 0.5], with one battle used. With only the masked row, the CLI should report no observations rather than fit an Elo. A human-label run over the same dataset must still use its valid human labels. I traced this statically and did not run the tests.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
A judge game without a verdict is now asked once more. If it still has no verdict, the row stays in the run with reward 0 and failure_kind arena:judge_no_verdict. The win rates leave it out and count it in rollout_failure_rate, so max_rollout_failure_rate bounds how many a run accepts. Before, the row was masked for re-judging, which no limit bounded and which withheld the score once its retries ran out. This replaces the content_filter-only terminal mask: a filtered game is one case of a game with no verdict. Signed-off-by: Wojciech Prazuch <[email protected]>
mpatel31415
left a comment
There was a problem hiding this comment.
SHIP WITH CARE
Reviewed commit 2e3d31521b42d63ff56fa0ab956e86c59c3d11b7. Two RISK findings are attached inline: successful parse retries still look unresolved to recovery, and the new terminal failure kind has no classification for trusted acceptance.
Validation: all 192 Arena tests passed on this head. Both findings were reproduced through actual verification and recovery code with judge HTTP responses mocked. No live judge calls were made during this review.
| if retry := [index for index, game in enumerate(games) if game.verdict is None]: | ||
| for index, game in zip(retry, await play(retry)): | ||
| games[index] = game |
There was a problem hiding this comment.
RISK — Account for rejected judge replies when retrying
Could you record each rejected reply at the per-call parsing site with record_rejected_judge_reply()? call_judge() retains the initial malformed response as a grading dependency. Replacing its game here does not account for that dependency, so observe_llm_judge_grading() leaves even a successful retry's outcome as unknown.
I reproduced this through observe_verifier(server.verify, enabled=True) with replies [[A>B]], a token-capped The answer is [[B, then [[B>A]]: verification returns reward 1.0 and two valid verdicts, but the grading outcome is unknown, and reverification_cause(saved_row_evidence(row)) returns judge. Every successfully rescued row can therefore request another judge pass instead of settling.
Please cover the successful-retry case with verifier observability enabled, asserting a completed grading operation and no reverification cause. Keep the rejected reply as a dependency; the shared helper already supports that contract.
| return ArenaVerifyResponse( | ||
| **body.model_dump(), | ||
| reward=0.0, | ||
| failure_kind=JUDGE_NO_VERDICT, |
There was a problem hiding this comment.
RISK — Classify the terminal failure for trusted acceptance
Could you classify arena:judge_no_verdict as evaluation-side in the effective policy, or use a suitable shared classified kind? Namespaced kinds are accepted, but this new kind has no classification rule, so classify_failure() returns unknown.
Using an actual Arena no-verdict result projected through saved_row_evidence(), one such row among 101 completes recovery (complete=True, action noop) but makes trial_verdict() return UNVERIFIED: "1 trial failure(s) have unknown classification". Thus a run below the intended 1% failure cap still cannot receive a trusted acceptance pass. This does not prevent score publication; it prevents acceptance.
Giving the same kind an evaluation-side classification makes that same case return PASS with an exact failure rate of 1/101. Please add a regression through the trial-health gate, alongside the aggregation-cap test.
Signed-off-by: Wojciech Prazuch <[email protected]>
A game without a verdict is asked again, but the first reply stayed a plain dependency of the grade, so a game the retry rescued kept its grading outcome unknown and recovery asked for another judge pass. Mark the reply as rejected where it is parsed, as the shared helper intends; the grading then completes on the verdict that replaced it. Signed-off-by: Wojciech Prazuch <[email protected]>
A row whose judge still gives no verdict when asked again is a counted failure, not a masked one. Its arena-only kind had no classification, so the trial gate reported it as unknown and withheld a pass even below the failure limit. Register judge_no_verdict as a shared, evaluation-side kind that recovery never judges again, and use it in the arena server. One such row in 101 trials now passes the gate with an exact count. Signed-off-by: Wojciech Prazuch <[email protected]>
…r_game The judge sometimes returns an empty reply that the same prompt answers when asked again. One retry left a few such games without a verdict; ask each game up to judge_max_attempts_per_game calls in all (default 3) before the row counts as judge_no_verdict. Signed-off-by: Wojciech Prazuch <[email protected]>
Signed-off-by: Wojciech Prazuch <[email protected]>
…gain A game rescued when asked again saves a row that recovery settles, and a row still without a verdict is a registered evaluation-side failure that recovery never re-judges, both checked on an actual Arena row. The README now names judge_max_attempts_per_game instead of "one more call". Signed-off-by: Wojciech Prazuch <[email protected]>
|
/review |
Signed-off-by: Wojciech Prazuch <[email protected]>
|
/ok to test 7868eb2 |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/46663889587 |
What. A judge game without a verdict (output cut at its token cap, blocked by the provider's content filter, empty, or without a label) is asked again, up to
judge_max_attempts_per_gamecalls per game (default 3). If it still has no verdict, the row stays in the main output with reward 0,failure_kind: judge_no_verdictand afailure_reasonnaming the game. The win rates leave it out and count it inrollout_failure_rate, somax_rollout_failure_rate(1% for LMArena) bounds how many such rows a run accepts.judge_no_verdictis a new shared failure kind innemo_gym/core/failure_kinds.py: evaluation-side, final, never judged again. Each reply that is asked again is marked withrecord_rejected_judge_reply(), so a game the retry rescues completes its grading.Why. Since #5866 such a row raised
JudgeError, andjudge_failsafemasked it asjudge_failedfor re-judging. Masked rows never reach themax_rollout_failure_ratecheck, and once re-judging ran out, the completeness gate withheld the whole score. In one LMArena v3 run, 7 of 3,713 rows (0.19%) ended this way: 4 content-filter blocks and 3 judge reasoning runaways (the judge thinks to ~31.4k of its 32,768 output tokens and never writes a label). The run got no score. The benchmark owner asked to bound these with the existing failure rate rather than mask them with no limit.A later LMArena v3 run of a newer checkpoint, judged by gemini-3.1-pro-preview without this PR, ended with 210 of 3,713 rows (5.7%) without a verdict. Of the 214 judge replies behind them, 196 were empty: status
completed, finish reasonstop, 0 output tokens, about 2 s. That is 196 of 6,886 judge calls (2.8%). They are random: sending 10 of those exact requests again 3 times each gave a labelled verdict in 27 of 30 calls, and every prompt had one by its second try. Asking a game again therefore leaves well under 0.1% of games without a verdict, and the run within the 1% cap. A second resend of 12 empty requests, twice each, gave a verdict in all 24 calls. The rest were 8 content-filter blocks, 8 judge runaways to the output cap and 2 replies without a label.Behavior change.
win_rate*, the reported keys, already left a no-verdict row out. Scored rows are unchanged.mean/rewardnow counts the row as 0.max_rollout_failure_rateallows fails at aggregation with "Too many failed rollouts". Before, it ended with masked rows and no score.judge_no_verdictrow as an evaluation-side fault with an exact count: 1 such row in 101 trials passes. An unregistered server kind for the same row made the gate reportUNVERIFIED.Config.
judge_max_attempts_per_game(default 3, at least 1) sets the judge calls per game. 1 turns asking again off.Review. Both findings from the 11-23 review are addressed:
unknown, so recovery asked for another judge pass: the rejected reply is now recorded where it is parsed (bcb951dd88).arena:judge_no_verdicthad no classification for trusted acceptance: it is replaced by the registered, evaluation-sidejudge_no_verdict(555c87e99e).86a274dab1).The 11-18 automated review was of the first version, which masked content-filtered rows. The verifier now masks no row for a missing verdict. So the offline scorer, the cleanup script and the Elo fit see an ordinary failed judgment (a game without a verdict), like any other.
Known limitation. Trusted acceptance still counts a rescued row as unhealthy when its rejected reply was cut (content filter or output cap). The saved grading does not record which replies the verifier rejected, so the gate's cut-reply rule sees one. The score is unaffected. In the later run above, that is at most 16 rows (0.43%), under the 1% limit. The fix changes the shared grading record (save which replies were rejected, and skip them in that rule), so it is left for a follow-up.
Issue. None public. Found in internal LMArena v3 runs.
Validation.
resources_servers/arenatests: 209 passed, on current main. New: a game is asked until it gets a verdict, up to its attempts (two empty replies, then a verdict, scores the row); one attempt asks no game again; a game rescued when asked again completes its grading with verifier observability on (all three replies stay dependencies); it fails without the fix. A rescued row and a final no-verdict row, saved, have no reverification cause; both fail if the fix or the failure kind is removed.tests/unit_tests/eval/recovery/test_judge_no_verdict_trial_kind.py: onejudge_no_verdictrow in 101 trials gives recoverycomplete, a trial-gate PASS with an exact count and no re-judging; the same row with an unregistered server kind withholds the pass.pre-commit run --fileson the changed files.verifyin process, judge calls to gemini-3.1-pro-preview through Gym'sChatCompletionsConverter, as the vllm_model judge server sends them (18 calls). 3 rows were blocked by the content filter again and came out as counted failures, not masked. 3 got verdicts. 1 call failed with a DNS error on my machine and stayed masked for re-judging, as before. So 3 of 3,713 rows (0.08%) would be counted failures.