You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace v0.2.1 units validators with a declarative table
Adds UnitsValidatedModel to base.py: a model base whose subclasses declare a
UNIT_RULES table (field name -> allowed units) instead of hand-writing a
check_units method. A single inherited validator merges the rules declared
across the MRO, so each class only states the fields it introduces and shared
fields are validated once.
Migrates the six v0.2.1 unit validators (the MediaPayloadStats hierarchy plus
AggregateRequests/AggregateThroughput) to this mechanism. The two aggregate
classes multiply-inherit UnitsValidatedModel alongside their v0.2 base; the
shared validator is named distinctly from v0.2's check_units so both co-run
rather than one shadowing the other. Behavior is unchanged and covered by the
existing compat and multimodal guardrail tests; the only schema-artifact diff
is an expanded AggregateRequests description.
Signed-off-by: Brendan Slabe <slabe@google.com>
Copy file name to clipboardExpand all lines: llmdbenchmark/analysis/benchmark_report/br_v0_2_1_json_schema.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@
114
114
},
115
115
"AggregateRequests": {
116
116
"additionalProperties": false,
117
-
"description": "v0.2 request statistics, plus multi-modal payload details.",
117
+
"description": "v0.2 request statistics, plus multi-modal payload details.\n\nInherits the v0.2 input/output-length unit checks and adds a declarative\nrule for the new request_size field.",
0 commit comments