Skip to content

measurement: schema version 2 — task and family, detection parity, vendor figures - #11

Closed
nathanhubens wants to merge 2 commits into
mainfrom
feat/measurement-schema-v2
Closed

nathanhubens wants to merge 2 commits into
mainfrom
feat/measurement-schema-v2

Conversation

@nathanhubens

Copy link
Copy Markdown
Contributor

Schema version 2 for fastermodels.measurement. Version-1 rows stay valid as written.

What changes

Kind Change
both task (classification / detection, required) and family; one column after join, both sides must agree
quality accuracy_source (measured / vendor_published); argmax_parity → parity + parity_metric (argmax / box_iou90: same class, IoU ≥ 0.9); ci_*, parity_metric, parity_floor required when measured, absent for a vendor figure
latency latency_source may be vendor_published; power_w; known recipe keys checked for type (RECIPE_KEYS), other keys free

Compatibility

  • Each row is read against the fields of its own schema_version (FIELDS_BY_VERSION); FIELDS is the current version.
  • upgrade(row, task, family=None) returns the version-2 row a version-1 row is (argmax_parity → parity, parity_metric='argmax', accuracy_source='measured').
  • join refuses to pair two versions; to_parquet writes one version per file, with that version's columns.
  • An unknown schema_version returns that single problem.

Why

Detection rows need a box parity, not an argmax one; comparisons against vendor reference models need a figure that is recorded and labelled, never a measurement (well formed, INVALID for anything that needs a measurement).

Tests

Existing tests pinned to version 1; a new v2 cell covers upgrade, version separation, detection rows, vendor rows, recipe keys, power, join and Parquet. Full suite passes.

…ndor figures

- task (classification | detection, required) and family on both kinds; one
  column after join.
- quality: accuracy_source (measured | vendor_published); argmax_parity becomes
  parity + parity_metric (argmax | box_iou90); intervals and parity rule
  required when measured, absent when a vendor published the figure.
- latency: latency_source may be vendor_published; power_w; the known recipe
  keys (RECIPE_KEYS) checked for type.
- Every row is read against the fields of its own schema_version (version-1
  files stay valid as written); upgrade(row, task, family) gives the version-2
  row; join refuses mixed versions; to_parquet writes one version per file.
- A vendor figure is well formed and never VALID as a measurement.
@nathanhubens
nathanhubens force-pushed the feat/measurement-schema-v2 branch from fc199f7 to 581ca22 Compare October 14, 2026 12:38
@nathanhubens

Copy link
Copy Markdown
Contributor Author

Closing: the measurement-row schema is no longer maintained in this package, so this change is superseded. fastermodels keeps loading, evaluation, cards and the publication gate.

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