Result schema 2
Localgauge stores measurements as schema-2 records. Historical schema-1 files stay immutable. Readers use evals.schema2.adapt_result or adapt_reference_directory; current writers emit schema 2.
Record types
Each JSON document has schema_version: 2 and one record_type:
task_run: one local or hosted coding task, with one or more attempts.suite_summary: aggregate task and language results. The rootsetupmakes the summary usable without opening its task files.speed_probe: repeated timing measurements.fit_probe: a configuration, memory-fit, or effective-context probe.hybrid_comparison: a local/hosted workflow result.delegation_result: a bounded delegated repository change and its verification evidence.
The draft 2020-12 JSON Schemas are under schemas/. adapt_result raises ValueError for unknown types. Directory adaptation marks the file failed and continues. A suite requires one base URL, model, attempts, token budget, timeout and context. Its root setup is shared; resumes cannot change those settings.
Common fields
Every record has:
| Field | Meaning |
|---|---|
run_id |
Stable filename stem for historical files, or the writer's generated stable run name. |
attempts[] |
One normalized shape with attempt, attempt_id, pass, failure_category, metrics and token provenance. Empty when a record has no discrete attempts. |
setup |
Stable setup identity, model, quantization, context, profile and sampling. |
machine_id |
Reference to machines/<id>.json; null when the writer was not given a probed machine id. |
task_set |
Stable {id, version} pair for comparison. |
server.launch |
Build, alias, context, slots, KV types, CPU-MoE, GPU layers, batch/ubatch, flash attention, draft/MTP and reasoning budget. |
evidence |
measured, derived, or inferred. |
token_source |
llama.cpp, provider, or null for a mixed record. |
unknown_reasons |
Reason for each unavailable or intentionally mixed value. |
Legacy fields keep schema-1 readers compatible while new consumers get one normalized root. The adapter starts with the original object, then replaces normalized fields. server is merged: original facts remain beside normalized launch, evidence and unknown_reasons. Prefer the normalized field when they disagree.
Common fields stay as root objects. Unavailable nested values are null with a dotted-path reason. A known task set without a version is {"id":"real-tasks","version":null}. Only an unclassifiable set uses {"id":"unclassified","version":null}. unknown_reasons keys are dotted paths, for example {"machine_id": "writer did not receive a machine id from a completed probe"}. Attempts carry token_unknown_reason beside token_source; counters stay under metrics.
Without a metrics capture, metrics may be null and token_unknown_reason explains why. Other metrics keep timing and requests while unavailable token fields stay null. A missing capture can look like:
{
"attempt": 1,
"attempt_id": "20261201T000000Z-example/1",
"pass": false,
"failure_category": "timeout",
"token_source": "llama.cpp",
"token_unknown_reason": "capture file is missing or empty",
"metrics": null
}
Identity rules
setup.id hashes exactly model, quant, context, launch, profile and sampling as canonical UTF-8 JSON with lowercase SHA-256. launch is the full normalized server.launch; absent keys become null before hashing. Extra launch keys remain in sorted position, so a new setup fact cannot silently collide. Use sorted keys, no insignificant whitespace, ensure_ascii, no NaN and null for missing Python None. setup.slug is readable; it is not identity.
The unit test vector is:
{"context":65536,"launch":{"alias":null,"batch":null,"build":"b12652-212c547fe","cpu_moe":null,"draft":null,"flash_attention":null,"gpu_layers":null,"kv_type_k":null,"kv_type_v":null,"mtp":null,"n_ctx":65536,"reasoning_budget":null,"slots":null,"ubatch":null},"model":"unsloth/Inkling-2-Mini-GGUF:UD-Q4_K_M","profile":"pi-local","quant":"Q4_K_M","sampling":{"temperature":0}}
Its digest is bb606786dd79fd1ff2d8b0c18976ef6f04dc73f45404744eb05a9c1b6ba98310.
The literal launch keys and types are:
| String or null | Integer or null | Boolean or null |
|---|---|---|
build, alias, kv_type_k, kv_type_v |
n_ctx, slots, cpu_moe, gpu_layers, batch, ubatch, draft, mtp, reasoning_budget |
flash_attention |
The per-type schemas under schemas/ are authoritative for the remaining JSON shapes. setup.profile is a string or null. setup.sampling is the writer-supplied object used exactly as given: no defaults or aliases are inserted, absent top-level sampling is {}, and nested keys are sorted in the canonical serialization. Supported values must be JSON types. An unavailable quantization, context or profile becomes null; an unavailable launch key also becomes null. An attempt's metrics is a legacy-compatible object because providers expose different counters, with token provenance and unknown reasons normalized alongside it.
For task, probe, hybrid and delegation records, run_id is the JSON filename stem. 20261201T110432Z-98b7abbc-go-poker.json therefore uses 20261201T110432Z-98b7abbc-go-poker. Standalone writers add a UTC timestamp and random suffix, so retries get new ids. A suite summary uses its output-directory name. A summary at results/runs/20261203T120000Z-model/summary.json uses 20261203T120000Z-model; task files keep filename-derived ids. --resume keeps both directory and filenames. attempt_id is <run_id>/<positive-attempt-number>.
Task-set ids and versions are selected as follows:
| ID | Records | Version |
|---|---|---|
polyglot-10 |
Polyglot tasks and suites | 40-character benchmark commit from evals/tasks/polyglot/metadata.json |
frontier-subset-8 |
Hosted or hybrid records | SHA-256 of the exact UTF-8 evals/tasks/frontier-subset.json bytes |
real-tasks |
Real-task manifests and suites | SHA-256 of an individual record's exact task.json; suites use their benchmark_commit when one is recorded |
speed-probe |
Speed probes | SHA-256 of the UTF-8 question bytes |
fit-probe |
Fit/configuration probes | SHA-256 of sorted compact JSON for configuration |
delegation |
Delegation results | SHA-256 of sorted compact JSON for task, allowed paths and test command |
A record without one of those sources uses unclassified and a null version with a reason. A timestamp is never used as a task-set version.
Evidence and token counters
measured: captured by the current writer from the endpoint, probe, process or verifier.derived: rebuilt by the historical adapter from a source result and committed machine notes.inferred: a statistical or modelling estimate, not an observation.
Historical adapter values are derived, even when the source was measured. Schema 2 reconstructed them without changing the immutable file.
Local token counters come from llama.cpp timing/usage payloads. Hosted counters come from the provider. A mixed hybrid record has null root token_source and marks that reason; child attempts state their own source. Missing or unreliable counters stay null and carry token_unknown_reason; they are never replaced with a plausible value.
Failure categories
The fixed first-match precedence is:
edited_testsout_of_scopetimeoutout_of_tokenstool_errorno_editwrong_fixmissed_review_findingserver_error
Category triggers use exact verification criteria and observed events: protected_file_hash_mismatch or protected_test_hash_mismatch; diff_out_of_scope; timeout state or test_timed_out; ran_out_of_tokens, ran_out_of_tokens_or_turns, missing_agent_settled, or usage.completion_tokens == max_tokens in a request payload; a nonzero tool_errors; no_implementation_diff or ran_tests == false when tests are required; test_failed or behavioral_test_failed; and the review-only missing_required_finding, unexpected_findings, or review_findings_mismatch criteria. A passing attempt has null failure_category.
An HTTP response_status (or status from provider-shaped captures) from 500 through 599 in metrics.server_requests[] is checked after missed_review_finding. Missing or false timeout state permits server_error; true timeout state already won. A failed attempt with no matching trigger has null category plus its other verification evidence. Historical ran_out_of_tokens_or_turns is normalized to out_of_tokens by the adapter.
Launch and machine facts
Writers read /health and /props even with a context override. An explicit CLI context wins over /props and remains when /props is unavailable. The result keeps the winning server.launch.n_ctx. --server-command captures llama.cpp flags that are not exposed. --machine-id must name a completed probe.
scripts/probe_machine.py emits no hostname or username. The committed reference record is machines/personal-4060ti.json. A writer that receives no machine id writes null and records the reason.
Adapter coverage
adapt_reference_directory("results/reference", repo_root=...) returns (report, records) without writing. The report has total, clean, partial, failed, by_record_type and per-file coverage. Each file entry has {path, coverage, record_type} or {path, coverage: "failed", reason}. Successful normalized records are filename-sorted.
It read all 134 committed JSON files without changing them. Suite summaries are reconciled with their linked member task runs before coverage is counted, so a historical summary without model, context, or launch facts inherits the one setup identity shared by all of its members. The reconciliation is derived and records its member run IDs.
| Coverage | Files | Meaning |
|---|---|---|
| Clean | 91 | All required, available facts mapped without an unresolved identity/provenance gap; hosted records treat local server-launch fields as intentionally inapplicable. |
| Partial | 43 | Mapped to schema 2, with explicit nulls/reasons for historical gaps. |
| Failed | 0 | No committed reference file was left unreadable. |
| Record type | Files | Clean / partial |
|---|---|---|
task_run |
101 | 79 / 22 |
suite_summary |
8 | 6 / 2 |
speed_probe |
14 | 4 / 10 |
fit_probe |
10 | 2 / 8 |
hybrid_comparison |
1 | 0 / 1 |
delegation_result |
0 | 0 / 0 |
The partial rows include 26 without a matching historical local launch command, 23 without a recorded model alias, two without a stable task-set version, one suite without a model identity, and one mixed-token-source hybrid row. These are reported, not guessed. The reason counts are not additive: one file can have more than one reason. The adapter defines clean as no coverage gaps after ignoring server.launch.* keys for hosted-only results, where those fields are explicitly inapplicable. Any remaining unknown_reasons key makes the record partial.
Comparison verdicts
evals.verdicts.compare_setups(a, b) expects pre-aggregated per-task rows, not raw task-run records. Convert a suite_summary.tasks[] row by using task, passes, attempts and mean_wall_seconds as mean_seconds. For separate task runs with repeated attempts, group attempts by the task's stable task value, sum passes and attempts, and aggregate wall seconds using the intended suite statistic. This avoids mixing schema shape with statistical policy inside the pure function.
The function expects each input row to have a unique string task, integer passes, positive integer attempts, and optional numeric mean_seconds. It pairs by the exact task string and uses the intersection; no shared task raises ValueError. For each task it calculates passes / attempts; the paired estimate is B's task rate minus A's task rate, averaged across shared tasks. With repeated attempts on both sides, interval is the 2.5th-to-97.5th percentile interval from a deterministic paired-task bootstrap (10,000 samples, seed 20261203, Python random.Random Mersenne Twister). Percentiles linearly interpolate the value at position quantile × (sample_count - 1). Resampling whole tasks avoids treating attempts on the same task as independent.
rate_interval(rows) uses that whole-task bootstrap for a multi-attempt setup. A setup with one attempt on every task instead uses one Wilson 95% interval over its task-level passes. When both sides have one attempt per task, compare_setups uses a Wilson-based Newcombe difference interval adjusted with the observed task-pair correlation, recorded as newcombe-wilson-paired-difference-95. This means identical marginal rates on concordant tasks produce a different interval from identical marginal rates on discordant tasks. Mixed or repeated-attempt comparisons use the whole-task bootstrap. The interval must exclude zero to be distinguishable. direction means B versus A: b_better, a_better, or indistinguishable at the stated interval.
speed_gap_seconds uses only tasks where both passes / attempts > 0 and both mean_seconds values are finite positive numbers. It records the median of B's per-task time minus A's per-task time, and a deterministic 95% bootstrap percentile interval from resampling whole shared-passed tasks. Fewer than five eligible tasks returns null values and the reason fewer than five shared passed tasks. The legacy speed_ratio still divides the unweighted B mean by the unweighted A mean over the same eligible task set. A shared passed task with a missing or invalid time is excluded and does not count toward the five-task minimum; a task with zero attempts is invalid rather than excluded.
For equal group sizes n, n_to_separate uses ceil(2 × (1.959964 + 0.841621)^2 × pbar(1-pbar) / (pB-pA)^2), where pA and pB are total shared-task passes divided by total shared-task attempts and pbar = (pA+pB)/2. This is an attempt-level power approximation alongside a task-resampled paired interval; the two serve different questions. The result uses 80% power and 95% two-sided significance, is explicitly inferred, assumes both observed rates remain true, and returns null when the observed rates match.
A complete verdict keeps the field meanings explicit:
{
"distinguishable": true,
"direction": "b_better",
"speed_ratio": 0.5,
"speed_unknown_reason": null,
"speed_gap_seconds": {"estimate": -10.0, "low": -20.0, "high": 5.0, "method": "paired-task-bootstrap-median-percentile-95", "shared_passed_tasks": 5, "unknown_reason": null},
"interval": {"low": 0.2, "high": 0.6, "method": "paired-task-bootstrap-percentile-95"},
"rate_intervals": {
"a": {"low": 0.3, "high": 0.7, "method": "wilson-95"},
"b": {"low": 0.5, "high": 0.9, "method": "wilson-95"}
},
"n_to_separate": {"value": 58, "evidence": "inferred", "unknown_reason": "normal two-proportion approximation assumes both observed rates hold and equal group sizes; null when rates match"},
"evidence": "derived"
}
The sample-size value is illustrative; the compare_setups unit tests below pin real values. If speed_ratio is null, speed_unknown_reason explains why.
Known unit values pin the methods:
- Wilson 95% for 5/10:
0.2365930905to0.7634069095. - A one-attempt 0/2 versus 2/2 comparison has method
newcombe-wilson-paired-difference-95and lower endpoint0.069985198855. - Median task gaps
[1, 1, 3, 3, 3]have a3.0second estimate and a1.0to3.0second fixed-seed bootstrap interval. - Two all-positive 1.0 task differences: paired interval
1.0to1.0, B better. - With equal group sizes and 60% versus 70% aggregate rates:
n_to_separate.value = 358attempts per setup.
Resident setup
detect_resident_setup(base_url, records) reads /props, matches model_alias against the records' server.launch.alias, and uses /props n_ctx (or default_generation_settings.n_ctx) when available to distinguish aliases loaded at different contexts. It ignores records missing either alias or setup id. It deduplicates matching setup ids because the same setup can have many runs. It returns {"status": "recognised", "alias": "...", "setup_id": "..."} for exactly one matching id. A missing/invalid /props alias, or zero/multiple matching setup ids, returns {"status": "unrecognised setup", "alias": ..., "setup_id": null}. A failed /props request raises its endpoint error so transport failure is not reported as an identity mismatch. The function never infers a resident from a similar model name.