Skip to content

feat(results): add versioned result row contract with collector quarantine - #3806

Draft
adibarra wants to merge 8 commits into
mainfrom
feat/result-schemas
Draft

adibarra wants to merge 8 commits into
mainfrom
feat/result-schemas

Conversation

@adibarra

@adibarra adibarra commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Producer-side contract for the result rows InferenceX publishes. The app ETL (TypeScript) is unchanged here, except for one follow-up listed below.

  • Models (infx/results/schema/): strict pydantic models for fixed-sequence, AgentX and eval rows and for run stats. They encode what producers emit today. Identity fields are typed strictly, and extra metric keys must match the latency/interactivity naming pattern or a known power key.
  • Version stamp: producers stamp result_schema_version: 1. A collector that receives an unstamped row from an older checkout validates it as v1 and stamps it. A row with an unknown version is rejected.
  • Quarantine: collect_results, collect_eval_results and calc_success_rate write the aggregate of valid rows. Invalid rows go to rejected_rows.json with the validation errors, with one ::error:: per row and exit code 1.
  • Workflows: aggregate and run-stats uploads now run unless the job was cancelled, so valid rows still upload when the collector exits 1. rejected_rows_* files are uploaded as artifacts.
  • JSON Schema: python -m infx.results.schema export writes JSON Schema, committed under inferencex-e2e/schemas/. A test keeps the committed files equal to the export.
  • Containers: infx.bench stays stdlib-only; no validation runs inside containers.
  • Docs: docs/results-and-ingestion.md has a "Result row contract" section.

Verification

  • Tests build real rows with the real producers, then check that missing isl, string conc and NaN rows are quarantined while valid rows aggregate. Other tests cover the legacy stamping path, unknown versions, the eval path, and that the committed schemas match the export.
  • 588 real rows from recent run-sweep and e2e artifacts pass validation with 0 rejections: 52 fixed-sequence, 103 AgentX, 69 eval, 364 run-stats.
  • The full suite passed (2052 tests) before the follow-up commit; the targeted suites passed after it. Ruff is clean.

App side

…ntine

Add Pydantic models for fixed-sequence, AgentX, eval, and run-stats rows under infx/results/schema, with strictly typed identity fields and metric families validated by key pattern. Producers stamp result_schema_version 1 from a stdlib-only package. Collectors write invalid rows to rejected_rows.json, annotate them, and exit non-zero after writing the valid aggregate; collect workflows upload both files. Commit generated JSON Schemas under schemas/ with a drift test.
…ions

Collectors validate rows without result_schema_version as version 1 and publish them stamped, so older checkouts keep publishing. Rows with any other version are quarantined as unsupported_version.
Python serialized non-finite floats in a rejected row as bare NaN or
Infinity tokens, so strict JSON parsers such as the InferenceX-app ingest
could not read rejected_rows.json. Write those values as strings such as
"NaN" and keep the rest of each rejected row unchanged.
Drop the never-overridden path parameter of quarantine.report, rename the
VERSION key constant to VERSION_FIELD, and index the source and task keys
that build_row always sets. Remove two assertions that repeated the
annotation coverage of the benchmark collector test, and condense the
result row contract section in both language versions of the guide.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant