aip_sdk.EvalTarget
aip_sdk.EvalTarget
One evaluation target in a v2 config: where metrics run, plus what runs there.
partition_type is the granularity to score at — "session", "trace" or
"span". partition_id names a saved partition selector, when the evaluation
scores one. At least one of the two must be set on a target you author;
EvalConfig.resolved_targets() also uses this model for the untargeted view of
a v1 config, where both are None. span_kind narrows a span target to a single
kind ("TOOL", "LLM", "AGENT", …) and is only valid when
partition_type is "span".
metrics and metric_configs keep their exact v1 shapes — a flat name list,
and a mapping keyed by bare metric name whose values stay free-form. Only the
nesting under a target is new.
Instances are frozen: a target is a value object, and allowing assignment would
let a caller set span_kind on a non-span target after validation had already
passed.
aip_sdk.EvalTarget.metric_configs
aip_sdk.EvalTarget.metric_configs: dict[str, MetricConfigValue] | None = None
No docstring is defined in the source.
aip_sdk.EvalTarget.metrics
aip_sdk.EvalTarget.metrics: list[str] | None = None
No docstring is defined in the source.
aip_sdk.EvalTarget.model_config
aip_sdk.EvalTarget.model_config = ConfigDict(extra='forbid', frozen=True)
No docstring is defined in the source.
aip_sdk.EvalTarget.partition_id
aip_sdk.EvalTarget.partition_id: str | None = None
No docstring is defined in the source.
aip_sdk.EvalTarget.partition_type
aip_sdk.EvalTarget.partition_type: PartitionType | None = None
No docstring is defined in the source.
aip_sdk.EvalTarget.span_kind
aip_sdk.EvalTarget.span_kind: SpanKind | None = None
No docstring is defined in the source.