aip_sdk.MetricSpec
aip_sdk.MetricSpec
What one metric contributes to the methodology: its bar, the params it runs with, and what the platform recorded it resolving to when the plan was published.
Grouped per metric rather than split into sibling thresholds/metric_configs mappings,
so a bar for a metric the plan does not name is unrepresentable rather than needing a
cross-mapping key check.
Every field is optional: no threshold grades against the metric's registered score card,
no config runs on its op's declared defaults, and no config_ref pins no stored config.
config and config_ref layer rather than compete, and naming both is allowed because a
run can express the same thing: the stored config's params apply first and an inline
config key wins over them. The trade-off is per key — an inline key that overrides a
stored one costs the run's config identity stamp (it records metric_config_overridden
instead), so keep the two disjoint where the point of pinning was traceability.
aip_sdk.MetricSpec.config
aip_sdk.MetricSpec.config: dict[str, Any] = Field(default_factory=dict[str, Any])
No docstring is defined in the source.
aip_sdk.MetricSpec.config_ref
aip_sdk.MetricSpec.config_ref: MetricConfigRef | None = Field(default=None, description="A stored, versioned MetricConfig this metric runs with, pinned by its own `(config_name, config_version)`. Unlike the anonymous kwargs in `config`, a pinned config stamps its identity onto every result the run writes, and can carry judge prompts. One config per metric. Layers with `config`, which wins per key — at the cost of that identity stamp for any key it overrides. The pin names a version rather than freezing one: a stored config's params and prompts stay editable in place until a run has scored against it, so bump `config_version` for a content change if this plan's scoring has to stay reproducible.")
No docstring is defined in the source.
aip_sdk.MetricSpec.model_config
aip_sdk.MetricSpec.model_config = ConfigDict(extra='forbid')
No docstring is defined in the source.
aip_sdk.MetricSpec.published_required_columns
aip_sdk.MetricSpec.published_required_columns: list[str] | None = Field(default=None, description="Record, not instruction: the columns this metric required at publish, sorted. Platform-assigned like `published_version`. What a dataset needs *now* is the response's live `required_columns`, never this — the two answer different questions, and a difference between them is drift. `[]` means the metric genuinely required no columns; `null` means this instance has not been through the publish route.")
No docstring is defined in the source.
aip_sdk.MetricSpec.published_version
aip_sdk.MetricSpec.published_version: str | None = Field(default=None, description="Record, not instruction: the version of the metric *implementation* this metric resolved to at publish — its `OpRegistry.version`, not this plan's own `version`. Platform-assigned, and assigned the same way `version` is: a value supplied here is ignored, and recomputed on every publish. Nothing resolves the metric by it — a run still resolves by name — so this is what makes a later mismatch reportable as platform drift rather than as an authoring error.")
No docstring is defined in the source.
aip_sdk.MetricSpec.threshold
aip_sdk.MetricSpec.threshold: Threshold | ThresholdBand | None = None
No docstring is defined in the source.