Repository navigation
Record per-task judge, sandbox and scoring-code time - #499
Merged
Merged
Conversation
gregorybchris
force-pushed
the
chrisg/attribute-chat-inference
branch
from
October 26, 2026 19:59
db03cac to
11a0dab
Compare
Scoring runs in the main process event loop, concurrently across tasks. A ShareClock splits the loop's scoring time across the instances being scored at once, so judge calls and sandbox runs count toward their task without double counting. Metric computation blocks the loop and is credited to its task alone; writing predictions is credited to no task. The new optional scoring_seconds field reaches metrics.json, the upload payload, the ingest contract and a nullable task_results column. The ingest content hash leaves it out when null so re-uploads of older results keep their identity. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
gregorybchris
force-pushed
the
chrisg/task-scoring-seconds
branch
from
October 26, 2026 21:18
3b17b83 to
04014a0
Compare
Replace the shared scoring-loop time with three per-task sums, each built from pieces timed on their own: judge model calls, sandbox operations, and the event loop's own scoring work. Compute time is measured per coroutine step, so a CPU-bound scorer is no longer credited to judge calls that were waiting at the same time. Waits for a judge or sandbox slot are not counted. The values go to metrics.json only; the dashboard half is dropped until it has a reader. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Scorers that Task.score_responses gathers run as their own asyncio tasks, so their work was missing from compute time. A task factory installed for the scoring loop now step-times every task started while scoring. Process pool workers time each output and report it back, and the OCR scoring thread times its own work. Docs now say what judge time includes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Each pool worker now warms a process scorer up once, before any output is timed; MinervaMathScorer imports and calls its sympy checker. Child-task timing no longer chains onto an existing task factory, which could count a child's first step twice. Tests cover the runner installing and removing the factory. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…oard Carry scoring_judge_seconds, scoring_sandbox_seconds and scoring_compute_seconds from the uploader through the ingest contract, API storage and read model into the run Tasks tab and task drilldown. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Share the hash-optional field list with the re-upload test, store negative scoring seconds as null, show scoring columns only when a row recorded them, and use one set of labels and help text for the table and drilldown. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Give the timing helpers one verb (measure_scoring, measure_instance_scoring, add_scoring_seconds, install_child_task_timing), call the three components kinds everywhere, and drop the _seconds suffix from ScoringTimes' fields. Tests share one fake scoring clock. The dashboard names its constants after the scoring kinds, and the migration is renamed 0008_scoring_seconds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Each task in metrics.json now records how long its scoring spent on judge model calls, sandbox runs and its own scoring code. The dashboard stores the three values and shows them on a run's Tasks tab and in each task's details.
Why
A task's wall time doesn't say where the time went. Evals are slow for different reasons: a stronger judge model, a slow evaluated model, sandboxed code execution, or heavy answer checking. The run already records the overall time (
first_request_at,last_completed_at,processing_seconds) and each task's share of model inference (attributed_inference_seconds, #498). This PR adds the scoring components.What is measured
Each value is a sum of pieces timed on their own, so concurrent work counts in full and a value can exceed the wall time it took. The values don't add up to wall time, but they show where the work went.
scoring_judge_secondsscoring_sandbox_secondsscoring_compute_secondsHow (
src/olmo_eval/common/scoring_time.py):ScoringTimescurrent for each instance it scores (aContextVar). Judge call sites (build_openai_judge_fn, provider judges, the two vision judges) andSandboxManager._execute_with_leasetime each call into it.Task.score_responsesgathers its async scorers. Steps never overlap, so CPU-bound scoring is credited to its own task even while judge calls from other tasks are waiting.ProcessScorer.warmup;MinervaMathScorerloads sympy), so start-up isn't counted.Not recorded: judge and tool calls outside scoring (agent rollouts in inference workers, external benchmarks' own judges). Those tasks get 0.0 or, for the external runner, nothing.
The values are 0.0 when measured and nothing happened, and absent for older clients.
Dashboard
TaskRuntime.0008_scoring_timesadds three nullable columns. A field that is unset leaves the upload's content hash unchanged, so older clients' re-uploads are unaffected.Affected specs: none. No requests, scores or task hashes change; this is runtime telemetry only.
Validation
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 -q: 4,221 passed, 36 skippedagentsandlitellmextras,tests/core tests/harness tests/runners tests/providers tests/common tests/evals/tasks: 2,739 passed, 31 skippeddashboard/api: ruff, ty, andpytest. Locally 172 passed and 114 database tests skipped (no Postgres). CI's API job ran all 286 with Postgres and passed.npm --prefix dashboard/ui run contract:check,typecheck,test(88 passed),lintprocess_results, each getting its own time-m mock:gsm8k+ifeval: compute only, no judge or sandbox timeminerva_math_algebra,limit=10: 0.09 s compute against 0.73 s processing (1.54 s before the warmup fix)Not run: a Beaker trial with a real judge or sandbox task. The judge and sandbox call sites are covered by unit tests with fake clients only.
🤖 Generated with Claude Code