Skip to main content

aip_sdk.MetricConfigSummary

aip_sdk.MetricConfigSummary(id: str, workspace_id: str, config_name: str, config_version: str, metric_name: str, metric_version: str, prompt_slots: list[str], params: dict[str, Any], created_by: str | None, created_at: datetime | None, updated_at: datetime | None, usage_count: int, workspace_default_version: str | None, last_used_at: datetime | None)

One row of a metric config listing — identity and provenance, without prompt bodies.

Attributes

  • id str: Row id.
  • workspace_id str: Owning workspace.
  • config_name str: Configuration name (not globally unique — see config_version).
  • config_version str: Version of this named configuration.
  • metric_name str: Name of the metric implementation this config parameterizes.
  • metric_version str: Implementation version this config targets.
  • prompt_slots list[str]: Names of the configured prompt templates. Full templates are on the detail object — call get_metric_config() or load().
  • params dict[str, Any]: Non-prompt parameters stored on this config.
  • created_by str | None: User id that created this config, if known.
  • created_at datetime | None: When this config version was created.
  • updated_at datetime | None: When this row was last modified.
  • usage_count int: Number of runs whose scoring snapshot pins this row. Advisory — a delete attempt re-checks at write time, so this can be stale by the time you act on it, but it lets you avoid attempting a delete you already know would
  • workspace_default_version str | None: The workspace default version this row was auto-materialized from on first dispatch use, or None for a hand-authored override. A materialized row's config_version always equals this value.
  • last_used_at datetime | None: When the most recent run pinning this row completed, or None when usage_count is 0. Shares its query path with usage_count server-side, so the two can never disagree about whether this row has ever been used.

Equality is on every field above (dataclass value-equality — two fetches of the same row with the same payload compare equal); hashing is coarser, on identity alone (id, workspace_id, config_name, config_version), because prompt_slots/ params are a list/dict and unhashable. That means two summaries for the same row can hash equal without being == (e.g. one fetched before and one after an update() changed params) — a coarser-but-consistent hash, never a contradiction of ==.

aip_sdk.MetricConfigSummary.config_name​

aip_sdk.MetricConfigSummary.config_name: str

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.config_version​

aip_sdk.MetricConfigSummary.config_version: str

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.created_at​

aip_sdk.MetricConfigSummary.created_at: datetime | None

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.created_by​

aip_sdk.MetricConfigSummary.created_by: str | None

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.id​

aip_sdk.MetricConfigSummary.id: str

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.last_used_at​

aip_sdk.MetricConfigSummary.last_used_at: datetime | None

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.load​

aip_sdk.MetricConfigSummary.load(*, client: APIClient | None = None) -> MetricConfig

Fetch the full detail object for this row, including prompt templates.

Deleting a config frees its (config_name, config_version) key immediately, so a later create can reuse it. If that happened between the listing and this call, the underlying fetch would otherwise silently hand back that unrelated new row instead of reporting this one gone — this method checks the resolved row's id against this summary's own and raises rather than doing that.

Parameters

  • client APIClient | None: Optional API client override. Defaults to the client the listing call itself used, not the module default, when this summary came from a listing; otherwise the module default, same as get_metric_config().

Returns

  • MetricConfig MetricConfig: the detail object for this exact row.

Raises

  • MetricConfigNotFoundError: If this config no longer exists (deleted since this summary was listed, even if a different config is now resolvable at the same key).
  • AuthError: If credentials are missing or invalid.
  • APIError: If the response is malformed.

aip_sdk.MetricConfigSummary.metric_name​

aip_sdk.MetricConfigSummary.metric_name: str

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.metric_version​

aip_sdk.MetricConfigSummary.metric_version: str

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.params​

aip_sdk.MetricConfigSummary.params: dict[str, Any]

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.prompt_slots​

aip_sdk.MetricConfigSummary.prompt_slots: list[str]

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.updated_at​

aip_sdk.MetricConfigSummary.updated_at: datetime | None

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.usage_count​

aip_sdk.MetricConfigSummary.usage_count: int

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.workspace_default_version​

aip_sdk.MetricConfigSummary.workspace_default_version: str | None

No docstring is defined in the source.

aip_sdk.MetricConfigSummary.workspace_id​

aip_sdk.MetricConfigSummary.workspace_id: str

No docstring is defined in the source.