Skip to content

fix(arena): count a judge game with no verdict as a failed rollout - #6371

Merged
laszkiewiczp merged 9 commits into
mainfrom
wprazuch/arena-judge-content-filter-terminal
Dec 1, 2026
Merged

laszkiewiczp merged 9 commits into
mainfrom
wprazuch/arena-judge-content-filter-terminal

Conversation

@wprazuch

@wprazuch wprazuch commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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_game calls per game (default 3). If it still has no verdict, the row stays in the main output with reward 0, failure_kind: judge_no_verdict and a failure_reason naming the game. The win rates leave it out and count it in rollout_failure_rate, so max_rollout_failure_rate (1% for LMArena) bounds how many such rows a run accepts.

judge_no_verdict is a new shared failure kind in nemo_gym/core/failure_kinds.py: evaluation-side, final, never judged again. Each reply that is asked again is marked with record_rejected_judge_reply(), so a game the retry rescues completes its grading.

Why. Since #5866 such a row raised JudgeError, and judge_failsafe masked it as judge_failed for re-judging. Masked rows never reach the max_rollout_failure_rate check, 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 reason stop, 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/reward now counts the row as 0.
  • A failed judge call (HTTP error, timeout) still raises and is masked for re-judging, as before.
  • A run with more no-verdict rows than max_rollout_failure_rate allows fails at aggregation with "Too many failed rollouts". Before, it ended with masked rows and no score.
  • The trial gate counts a judge_no_verdict row 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 report UNVERIFIED.
  • LMArena v4 (#6820, merged 11-30) uses the same verifier, so it gets the same retries and the same counting under its 1% limit.

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:

  • A rescued game kept its grading outcome unknown, so recovery asked for another judge pass: the rejected reply is now recorded where it is parsed (bcb951dd88).
  • arena:judge_no_verdict had no classification for trusted acceptance: it is replaced by the registered, evaluation-side judge_no_verdict (555c87e99e).
  • Both are now also checked on actual Arena rows with verifier observability on: a rescued row has no reverification cause, and a row still without a verdict is evaluation-side and is never judged again (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/arena tests: 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: one judge_no_verdict row in 101 trials gives recovery complete, a trial-gate PASS with an exact count and no re-judging; the same row with an unregistered server kind withholds the pass.
  • Core failure-kind, recovery fault-class, agent outcome and moved-path tests: 263 passed.
  • pre-commit run --files on the changed files.
  • Live judge, on the 7 saved rows of the first run: verify in process, judge calls to gemini-3.1-pro-preview through Gym's ChatCompletionsConverter, 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.

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]>
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 18, 2026 15:01
@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:mid Autobot PR risk: mid bug Something isn't working area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters needs-review PR is ready for code review and waiting on a reviewer labels Nov 18, 2026

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py line 345: ### RISK: Recovery still treats the terminal Arena exclusion as incomplete

    With one scored row and one newly produced mask_sample=true, failure_kind="arena:judge_content_filtered" row, decide_recovery reaches this generic MASKED branch. The later handling returns STOP because 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.complete and gate_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_failed stays 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 produce stop and judge failures produce reverify. Source reasoning only; I did not run these checks.

  • resources_servers/arena/scripts/compute_rollout_scores.py line 99: ### BLOCKER: Remove masked rows from offline score inputs

    The new verifier saves filtered judgments in the main JSONL, but this loader includes them unchanged. The documented offline scorer calls ArenaMetrics.compute directly, 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.py line 41: ### RISK: Cleanup deletes the newly terminal filtered result

    A new filtered row with a missing verdict returns True here. 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; expect False. 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.py line 170: ### BLOCKER: Honor the mask before building judge Elo observations

    The 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 marked content_filter, now produce a masked Arena row with two verdicts. build_observations ignores 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 None handling and before reading games, 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 games rows and legacy game0/game1 rows 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.

@yaoyu-33
yaoyu-33 requested a review from mpatel31415 November 18, 2026 15:37
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Nov 19, 2026
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]>
@wprazuch wprazuch changed the title fix(arena): treat a judge content_filter as a terminal masked outcome fix(arena): count a judge game with no verdict as a failed rollout Nov 20, 2026

@mpatel31415 mpatel31415 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread resources_servers/arena/app.py Outdated
Comment on lines +275 to +277
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot removed the sla:review-overdue Review response is over the one-business-day SLA label Nov 23, 2026
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]>
@nemo-pr-automation
nemo-pr-automation Bot requested a review from a team November 26, 2026 15:29
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]>
@nemo-pr-automation
nemo-pr-automation Bot requested review from a team November 26, 2026 15:55
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

@svcnvidia-nemo-ci svcnvidia-nemo-ci added risk:high Autobot PR risk: high and removed risk:mid Autobot PR risk: mid labels Nov 26, 2026
…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]>
…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]>
@wprazuch

wprazuch commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

/review

laszkiewiczp
laszkiewiczp previously approved these changes Dec 1, 2026
@wprazuch

wprazuch commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7868eb2

@laszkiewiczp
laszkiewiczp added this pull request to the merge queue Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/46663889587

Merged via the queue into main with commit 541d2ea Dec 1, 2026
76 of 81 checks passed
@laszkiewiczp
laszkiewiczp deleted the wprazuch/arena-judge-content-filter-terminal branch December 1, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters bug Something isn't working needs-review PR is ready for code review and waiting on a reviewer risk:high Autobot PR risk: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants