Skip to content

Count scoring failures against the failure budget instead of as zeros - #492

Merged
gregorybchris merged 9 commits into
mainfrom
chrisg/scoring-errors-incomplete
Oct 22, 2026
Merged

gregorybchris merged 9 commits into
mainfrom
chrisg/scoring-errors-incomplete

Conversation

@gregorybchris

@gregorybchris gregorybchris commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A failed score is no longer recorded as zero. When scoring an output fails, because a scorer raised, a judge gave no verdict after its retries, or a sandbox was lost or never configured, the output records the error and gets no score. Instances that end up with no scored output are left out of the metrics, and they count against the same failure budget as instances that produced no output. Within the budget, the task publishes its metrics with the failure counts beside them. Over the budget, or with nothing scored, the task fails and publishes nothing.

How a scoring failure is handled

Output. The error goes under the output's scoring_errors, keyed by the scorer, with no score:<scorer> value. The placeholders are gone from:

  • the execution, context and process scorer paths in Task._apply_scorers_async
  • JudgedTask and FrontierScience
  • the runner's fallback when score_responses raises (_record_scoring_failure). The raise interrupted scoring, so the response's scores and its outputs' score keys are dropped, and every output gets the error under __response__.

Instance, per scorer (common/scoring_failures.py). An error keyed by a scorer counts against that scorer only; an error under any other key, such as __response__, counts against all of them.

  • Scored: every output was scored.
  • Partially scored: some outputs were scored. The instance's score comes from those, and pass@k and pass^k count only the scored samples.
  • Unscored: no output was scored. A response with no outputs is unscored only if scoring it raised; the error is then kept on the new Response.scoring_error and saved as scoring_error in its prediction record. A response with no outputs and no error still scores as an unanswered question, as before.

Metrics. Task.compute_metrics leaves each instance out of the metrics whose scorer could not score it. compute_task_metrics also leaves out instances that no scorer could score, which covers tasks that override compute_metrics.

Task. Failures are counted after compute_metrics, because a task can record errors there; OmniDocBench does when its evaluator fails. An instance counts as unscored if any of the task's scorers left it unscored, so a scorer that scored nothing leaves nothing scored. Then one budget applies: if (instances with no output + unscored instances) / instances processed exceeds max_hard_failure_rate (default 5%), the task fails. A task with nothing scored fails at any budget. A failed task's metrics are withheld from metrics.json and the upload, and the run exits non-zero after writing results.

✗ mock:mt_bench (4/4 instances saved, 4 unscored; ...) (ERROR: No instance was scored out of 4
  (0 produced no output and 4 could not be scored). A task with nothing scored fails at any failure
  budget. First failure: ScoringIncompleteError: mt_bench judge call failed: ...)

JudgedTask and FrontierScience no longer raise when every sample of an instance fails; the instance is unscored instead.

Error classification

One format_scoring_error in common/scorers/execution.py builds the error entries for the shared scorer paths, the process pool, the judge tasks, FrontierScience, OmniDocBench and the runner. It marks an entry "infrastructure": "true" for:

  • ScoringIncompleteError, which includes JudgeParseError
  • SandboxRequiredError
  • SandboxInfrastructureError, which includes SandboxTransportError

SandboxInfrastructureError now lives in the same module; harness.sandbox.errors re-exports it.

The flag is a diagnostic. It doesn't change how a failure counts.

The sandbox gate in _apply_scorers_async tells two cases apart:

  • no sandbox configured: SandboxRequiredError
  • sandboxes configured, but none with the task's capability is running: SandboxInfrastructureError, naming the capability. The sandboxes either failed or were not configured with that capability; the message says which capability was missing.

A scoring call that finds its pool empty also raises SandboxInfrastructureError. OmniDocBench's evaluator failure keeps its infrastructure flag.

Reporting

Each task with a scoring failure gets a scoring_failures record:

{"instances_unscored": 1, "instances_partially_scored": 2, "outputs_unscored": 3,
 "infrastructure": 2, "by_type": {"JudgeParseError": 2, "KeyError": 1},
 "first_error": "JudgeParseError: no parseable verdict after 3 judge attempts"}

by_type counts each unscored output once, by its first error. first_error is capped at 500 characters in total, and the contract enforces it.

The record shows up in several places:

  • TaskResult and the task entry in metrics.json
  • the task's log line, for example 30/32 instances saved, 1 unscored, 1 partially scored
  • the summary table's instance column
  • a Warnings section printed under the summary table, with one line per published task that left instances out or scored some from only part of their outputs
  • the dashboard:
    • Contract: optional ScoringFailures on TaskResultIn and TaskResultRow.
    • API: a nullable task_results.scoring_failures column, added by migration 0007. The field is left out of the content hash when absent, so existing uploads keep their identity.
    • Upload client: sends the field only when it is present.
    • UI: the tasks table shows "+N unscored" beside the saved, processed and failed counts, and the run health panel lists unscored instances with their error types. A task whose instances produced no output now links to the task instead of to the scoring-error filter, since those instances have no rows.

The gate's names follow the new meaning: failure_budget_error, TaskResult.failure_budget_exceeded, TaskResult.failure_rate, FailureBudgetExceeded and check_failure_budget. The config knob keeps its name, max_hard_failure_rate, so existing configs and launch commands keep working; its documentation now covers both kinds of failure.

Compatibility

Logged in docs/result-compatibility.md. Task hashes don't change. Only results whose predictions carry scoring_errors are affected:

  • Metrics that averaged in the placeholder zeros now leave them out. For a mean of non-negative scores that raises the value, so a higher-is-better metric comes out better and a lower-is-better one, such as an error rate, comes out worse.
  • Metrics that already excluded failed outputs are unchanged: the judged-task, omniscience and Arena-Hard metrics.
  • A run with a few judge failures publishes now instead of being withheld.
  • A task's own error counts, such as omniscience's judge_parsing_errors, now cover only failures that didn't raise. The runner counts the rest.

Leaving failures out can bias a score, because they cluster on unusual outputs. A model whose outputs crash a sandbox more often has more of its worst outputs left out. The budget bounds that bias, and the published counts make it visible.

Not changed

  • ResearchQA and AstaBench SQA score an unparseable judge reply as 0, without recording a scoring error. Switching them changes those tasks' numbers, so it should be its own change.

Testing

  • Runner and scoring: tests/runners/test_scoring_failures.py and tests/runners/test_infrastructure_scoring.py cover:

    • instance states, per scorer and across the task
    • the exclusion from metrics, per scorer, including a task with two scorers where one failed
    • errors recorded during compute_metrics, which still fail a task with nothing scored
    • a failure on a response with no outputs reaching its prediction record and the upload flag
    • the budget: within it, exactly at it, a shared budget that each failure kind fits alone but the two together exceed, and nothing scored
    • counts by type, and the length cap on the quoted error
    • the log line, metrics.json, and the summary warnings
    • the runner's annotation of a raising score_responses, including responses with no outputs
    • the four sandbox cases: missing, empty, a healthy pool with the wrong capability, and a pool depleted during scoring
    • a scorer that scored nothing failing the task even with a budget of 1.0
    • finalize_task applying the configured budget
  • Placeholders: tests that asserted placeholder zeros, or a raise when all samples fail, now assert no score and an unscored instance. These span the base task, HLE, MT-Bench, MultiChallenge, Arena-Hard, FrontierScience and omniscience.

  • Dashboard API, run against Postgres 17 with TEST_DATABASE_URL set:

    • the field is optional and non-negative in the contract
    • it's stored on upsert and returned with the task row
    • it changes the content hash when present, and keeps the legacy hash when absent
  • Dashboard UI: a page test for the health panel item.

  • Upload: a client test that the field is sent only when present and validates against the schema.

  • Checks run:

    • uv run ruff check src/ tests/, uv run ruff format --check src/ tests/, uv run ty check src/
    • uv run pytest tests/ --ignore=tests/integration: 4,111 passed, 36 skipped; 4,156 passed with the agents and litellm extras
    • dashboard API: ruff, ty, pytest (281 passed)
    • dashboard UI: lint, typecheck, test (84 passed), contract:check, build
  • Mock runs:

    • olmo-eval run -m mock -t gsm8k -o limit=3 --no-upload records no scoring failures.
    • olmo-eval run -m mock --harness multi_turn_chat -t mt_bench -o limit=4 --no-upload, where the judge cannot run, fails the task with the message above. olmo-eval results upload --dry-run validates its payloads against the contract.
  • Beaker, a real partial failure: MT-Bench on allenai/Olmo-3-7B-Instruct, judged by gpt-4-0613 with judge_max_tokens=2048, at commit 2afc5f0c, on one Ceres H100 in ai2/olmo-eval-debug (01M5JKVS).

    • One of 80 questions could not be judged: its turn-2 prompt needed 9,986 tokens against the judge's 8,192-token context.
    • That is 1.25%, within the 5% budget, so the task published: score 8.98, turn 1 9.11, turn 2 8.85, with errors: [] and scoring_failures recording the one unscored instance and its BadRequestError.
    • The log line read 80/80 instances saved, 1 unscored, and the summary printed the warning. On main, the same failure marks the task "Incomplete" and withholds its metrics.
    • The run showed the warnings section printing literal [yellow] tags; f3104b7a fixes that, with a test.
  • Beaker, no regression: gsm8k:chat (generation, sync scorer) and arc_challenge:mc (log-probability), 200 instances each, at commit f3104b7a, on one Ceres H100 in ai2/olmo-eval-debug (01M5JMDC). Both tasks have no scoring_failures and no scoring errors in their predictions, and each published primary metric equals the mean of its 200 per-instance values: gsm8k:chat accuracy 0.945, arc_challenge:mc accuracy 0.735.

  • Beaker, main against this PR: five tasks that are prone to scoring failures, run on allenai/Olmo-3-7B-Instruct at 47fabfbd (this PR's base) and at f3104b7a, on one Ceres H100 each in ai2/olmo-eval-debug, with the same limits on both commits.

    Task main this PR Instances with scoring errors (main / PR)
    omniscience:judge, 200 −79.5 −83.5 0 / 0
    multichallenge, 266 0.230 0.247 0 / 0
    hle:text, 200 0.060 0.055 0 / 0
    frontierscience_olympiad, 100 0.030 0.030 0 / 0
    livecodebench:lite, 200, codex_universal harness withheld 0.330 64 / 0

    Judge tasks: 01M5JR7Z (main) and 01M5JR89 (PR). LiveCodeBench: 01M5JRA8 (main) and 01M5JRC7 (PR).

    • The tasks sample at a nonzero temperature, so the two commits mostly scored different generations, and the score differences come from sampling. Where a generation was identical on both commits (128 instances across omniscience, FrontierScience and MultiChallenge), its per-instance metrics were identical too.
    • No judge call failed on either commit, so these runs don't exercise the judge-failure path. The MT-Bench run above does.
    • On main, LiveCodeBench lost its scorer sandbox: one file write failed after its retries, and the 63 responses still waiting to be scored then raised SandboxRequiredError. Main recorded zeros for all 64 and withheld the task. With this PR, the same run would also fail, since 64 of 200 is far over the 5% budget, and the 63 would be reported as SandboxInfrastructureError, because sandboxes were configured. The PR's own run lost no sandbox.

🤖 Generated with Claude Code

@gregorybchris
gregorybchris requested a review from a team as a code owner October 17, 2026 03:32
gregorybchris and others added 5 commits October 22, 2026 10:22
- One format_scoring_error in common/scorers/execution.py replaces the copies
  in the task base and the runner. The runner's copy never set the
  infrastructure flag. SandboxRequiredError is now flagged too.
- SandboxInfrastructureError lives next to it; harness.sandbox.errors
  re-exports it.
- The sandbox gate raises SandboxInfrastructureError, naming the capability,
  when sandboxes are configured but none serving the task is healthy, and
  SandboxRequiredError only when none is configured.
- A scoring call that finds its pool empty raises SandboxInfrastructureError
  even when that call saw no failure itself.
- The runner's response-level error keeps the infrastructure flag only for
  outputs not already counted.

Co-Authored-By: Abhishek Rao <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An output whose scoring raised now carries its scoring_errors entry and no
score, everywhere a placeholder 0.0 was written: the execution, context and
process scorer paths, the judge tasks, FrontierScience, and the runner's
fallback when score_responses raises. A response is scored from the outputs
that were scored; with none, it has no score.

The runner computes a task's metrics without its unscored instances, those
with no scored output. Partially scored instances stay in, scored from their
scored outputs, and pass@k and pass^k count only scored samples. Judge tasks
no longer raise when every sample of an instance fails; the instance is
unscored instead. A response with no outputs keeps a scoring failure in the
new Response.scoring_error.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Instances with no output and unscored instances, those with no scored output,
now share one failure budget (max_hard_failure_rate, default 5%). A task over
it, or with nothing scored, fails and its metrics are withheld; within it, the
metrics are published from the scored instances. This replaces the rule that
any infrastructure scoring error marked a task incomplete.

Each task records scoring_failures: unscored and partially scored instances,
unscored outputs, how many were infrastructure failures, counts by exception
type, and the first error, capped at 500 characters. They appear in the task
log line, metrics.json, the summary table, and a warnings section under the
table for published tasks that left instances out or scored some from part
of their outputs.

The gate is renamed to match: failure_budget_error, failure_budget_exceeded,
FailureBudgetExceeded and check_failure_budget. finalize_task now uses
compute_task_metrics.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Contract: an optional ScoringFailures object on TaskResultIn and
  TaskResultRow, with regenerated schemas.
- API: stored in a new nullable task_results.scoring_failures column
  (migration 0007), left out of the upload content hash when absent so
  existing uploads keep their identity, and returned with each task row.
- Upload client: sends scoring_failures when metrics.json has it.
- UI: the tasks table shows unscored instances beside failed ones, and the
  "failed" filter includes them. The run health panel lists unscored and
  partially scored instances with their error types and first error, linking
  to the instances that carry scoring errors. Instances that produced no
  output now link to their task, since they have no instance rows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
design.md, CONTRIBUTING.md, AGENTS.md and the README's max_hard_failure_rate
entry describe the rule: an output whose scoring failed is left unscored, an
instance with no scored output is left out of the metrics, and both those and
instances with no output count against one failure budget. The
compatibility log records which earlier results it changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@gregorybchris
gregorybchris force-pushed the chrisg/scoring-errors-incomplete branch from fb4ad27 to 558ac1c Compare October 22, 2026 17:40
@gregorybchris gregorybchris changed the title Make any scoring error mark the task incomplete Count scoring failures against the failure budget instead of as zeros Oct 22, 2026
gregorybchris and others added 4 commits October 22, 2026 10:56
- An error keyed by a scorer leaves an output unscored for that scorer only; an
  error under any other key, such as __response__, applies to all. Each metric
  leaves out the instances its own scorer could not score, and an instance
  counts against the budget if any scorer left it unscored. The module moves to
  olmo_eval.common.scoring_failures so tasks can use it.
- Failures are counted after compute_metrics, which can record errors itself
  (OmniDocBench's evaluator), so such a task fails as having nothing scored.
- When score_responses raises, every output of the response is left unscored:
  no score from the interrupted call is trusted.
- Response.scoring_error is saved in the predictions record, and the upload's
  has_scoring_error flag sees it.
- The sandbox gate counts running executors that are bound to agent sessions,
  so busy sandboxes are not reported as missing.
- The process pool and OmniDocBench build errors with format_scoring_error.
- finalize_task applies the configured budget.
- first_error is capped at 500 characters in total, and the contract and the
  ingest model enforce it. The tasks table labels the unscored count.
- Docs: correct which way lower-is-better metrics move, say sandbox failures
  now publish within budget, and keep "a task with no scored responses fails"
  among the invariants.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- When score_responses raises, the fallback also removes the response's
  scores and its outputs' score keys, so none reach the predictions or the
  dashboard's per-instance statistics.
- "Nothing scored" uses the budget's definition: an instance counts as scored
  only if every scorer scored it. A scorer that scored nothing therefore fails
  the task at any budget instead of publishing 0.0.
- The sandbox gate goes back to the capability environment's is_running: the
  runner's scoring pool is never bound, so counting bound executors had no
  effect. A pool with no sandbox for the capability reports that, rather than
  infrastructure failures that did not happen.
- Tests for finalize_task's budget and for a scorer that scored nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The warnings section passed Rich markup tags with markup disabled, so the
summary showed "[yellow]" around each line. Apply the color as a style
instead; the line quotes an error message, so markup stays off.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@gregorybchris
gregorybchris merged commit d60f81f into main Oct 22, 2026
13 of 14 checks passed
@gregorybchris
gregorybchris deleted the chrisg/scoring-errors-incomplete branch October 22, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant