Skip to main content

aip_sdk.partitions

Partition authoring, resolution, and metric availability for agent-trace dataset versions.

A partition names a typed evaluation target — a session, a trace, or a specific span — via a re-resolvable PartitionSelector. Create a partition on a dataset version, list the partitions on a version, resolve a partition to the concrete canonical objects it selects across the version's traces, and ask which trace metrics can score it.

aip_sdk.partitions.DatasetMetricAvailability​

aip_sdk.partitions.DatasetMetricAvailability

A single metric's verdict for one dataset version. reasons is empty exactly when available is true.

aip_sdk.partitions.DatasetMetricAvailability.available​

aip_sdk.partitions.DatasetMetricAvailability.available: bool

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricAvailability.model_config​

aip_sdk.partitions.DatasetMetricAvailability.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricAvailability.op_name​

aip_sdk.partitions.DatasetMetricAvailability.op_name: str

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricAvailability.reasons​

aip_sdk.partitions.DatasetMetricAvailability.reasons: list[DatasetMetricUnavailableDetail] = Field(default_factory=list[DatasetMetricUnavailableDetail])

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricUnavailableDetail​

aip_sdk.partitions.DatasetMetricUnavailableDetail

One reason a dataset metric is unavailable, with an explanation naming what to fix.

aip_sdk.partitions.DatasetMetricUnavailableDetail.detail​

aip_sdk.partitions.DatasetMetricUnavailableDetail.detail: str

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricUnavailableDetail.model_config​

aip_sdk.partitions.DatasetMetricUnavailableDetail.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.DatasetMetricUnavailableDetail.reason_code​

aip_sdk.partitions.DatasetMetricUnavailableDetail.reason_code: MetricErrorCode

No docstring is defined in the source.

aip_sdk.partitions.DatasetVersionMetricAvailability​

aip_sdk.partitions.DatasetVersionMetricAvailability

Per-metric availability for one dataset version's own rows (not partition occurrences). has_connection is echoed since it changes every verdict.

aip_sdk.partitions.DatasetVersionMetricAvailability.available_metrics​

aip_sdk.partitions.DatasetVersionMetricAvailability.available_metrics: list[str]

The names of the metrics that can score this dataset version, in response order.

aip_sdk.partitions.DatasetVersionMetricAvailability.dataset_id​

aip_sdk.partitions.DatasetVersionMetricAvailability.dataset_id: str

No docstring is defined in the source.

aip_sdk.partitions.DatasetVersionMetricAvailability.dataset_version_id​

aip_sdk.partitions.DatasetVersionMetricAvailability.dataset_version_id: str

No docstring is defined in the source.

aip_sdk.partitions.DatasetVersionMetricAvailability.has_connection​

aip_sdk.partitions.DatasetVersionMetricAvailability.has_connection: bool = True

No docstring is defined in the source.

aip_sdk.partitions.DatasetVersionMetricAvailability.metrics​

aip_sdk.partitions.DatasetVersionMetricAvailability.metrics: list[DatasetMetricAvailability] = Field(default_factory=list[DatasetMetricAvailability])

No docstring is defined in the source.

aip_sdk.partitions.DatasetVersionMetricAvailability.model_config​

aip_sdk.partitions.DatasetVersionMetricAvailability.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.GetOrCreatePartitionResult​

aip_sdk.partitions.GetOrCreatePartitionResult

Outcome of get_or_create_partition().

A plain (partition, created) tuple still unpacks the same way, but named access (result.partition/result.created) is also available.

Attributes

  • partition Partition: The partition — freshly created, or an existing, selector-matching one of the requested name.
  • created bool: True when this call created partition, False when an existing partition of this name was found and reused instead.

aip_sdk.partitions.GetOrCreatePartitionResult.created​

aip_sdk.partitions.GetOrCreatePartitionResult.created: bool

No docstring is defined in the source.

aip_sdk.partitions.GetOrCreatePartitionResult.partition​

aip_sdk.partitions.GetOrCreatePartitionResult.partition: Partition

No docstring is defined in the source.

aip_sdk.partitions.MetricAvailability​

aip_sdk.partitions.MetricAvailability

A single metric's verdict for one partition on one dataset version.

reasons is empty exactly when available is true. The gates are independent, so a metric short both a span kind and a ground-truth column reports both; within a gate the list is not exhaustive, so clearing every listed reason can surface a further one. The deployment gate contributes only when the report's deployment_checked is true.

aip_sdk.partitions.MetricAvailability.available​

aip_sdk.partitions.MetricAvailability.available: bool

No docstring is defined in the source.

aip_sdk.partitions.MetricAvailability.model_config​

aip_sdk.partitions.MetricAvailability.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.MetricAvailability.op_name​

aip_sdk.partitions.MetricAvailability.op_name: str

No docstring is defined in the source.

aip_sdk.partitions.MetricAvailability.reasons​

aip_sdk.partitions.MetricAvailability.reasons: list[MetricUnavailableDetail] = Field(default_factory=list[MetricUnavailableDetail])

No docstring is defined in the source.

aip_sdk.partitions.MetricErrorCode​

aip_sdk.partitions.MetricErrorCode

Why a dataset (row-level) metric cannot score a dataset version. Same vocabulary as the POST /runs gate, so a verdict here matches what a run attempt would hit.

aip_sdk.partitions.MetricErrorCode.OP_MISSING_COLUMNS​

aip_sdk.partitions.MetricErrorCode.OP_MISSING_COLUMNS = 'OpMissingColumns'

No docstring is defined in the source.

aip_sdk.partitions.MetricErrorCode.OP_NOT_FOUND​

aip_sdk.partitions.MetricErrorCode.OP_NOT_FOUND = 'OpNotFound'

No docstring is defined in the source.

aip_sdk.partitions.MetricErrorCode.OP_SCHEMA_INCOMPATIBLE​

aip_sdk.partitions.MetricErrorCode.OP_SCHEMA_INCOMPATIBLE = 'OpSchemaIncompatible'

No docstring is defined in the source.

aip_sdk.partitions.MetricErrorCode.OP_TASK_TYPE_INCOMPATIBLE​

aip_sdk.partitions.MetricErrorCode.OP_TASK_TYPE_INCOMPATIBLE = 'OpTaskTypeIncompatible'

No docstring is defined in the source.

aip_sdk.partitions.MetricErrorCode.SCORER_CONTRACT_MISMATCH​

aip_sdk.partitions.MetricErrorCode.SCORER_CONTRACT_MISMATCH = 'ScorerContractMismatch'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableDetail​

aip_sdk.partitions.MetricUnavailableDetail

One reason a metric is unavailable, with an explanation naming what to fix.

aip_sdk.partitions.MetricUnavailableDetail.detail​

aip_sdk.partitions.MetricUnavailableDetail.detail: str

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableDetail.model_config​

aip_sdk.partitions.MetricUnavailableDetail.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableDetail.reason_code​

aip_sdk.partitions.MetricUnavailableDetail.reason_code: MetricUnavailableReason

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason​

aip_sdk.partitions.MetricUnavailableReason

Why a trace metric cannot score a partition.

The first four are properties of the metric against the occurrence rows it would score; the next four are structural — the partition's granularity, the span kinds its occurrences carry, or (REQUIRED_SHAPE_UNSUPPORTED) the topology of the traces it resolves to, e.g. an orchestrator delegating to subagent(s). PARTITION_HAS_NO_OCCURRENCES is a property of the selector as a whole and answers "why is everything unavailable" for an over-narrowed partition. OP_NOT_DEPLOYED is a property of the environment: the metric exists and fits, but its scoring function is not running here, so a run would fail. Ask whoever operates your platform to deploy it.

AMBIGUOUS_TRACE_GROUND_TRUTH is a property of the ground truth attached to the version. agent.step_accuracy and agent.tool_selection_accuracy fall back to a session's pooled ground truth when a trace carries no annotation of its own — correct for a single-trace session, but a multi-trace one has no single trace whose steps or tool calls should be compared against a trajectory authored for the whole conversation, so both metrics reject that occurrence outright at scoring time rather than silently mis-scoring it (a FAILED row, not a wrong number). Fix by attaching trace-scoped ground truth for the affected traces, or by scoring the metric on a SESSION partition instead.

Reported only when every occurrence a TRACE partition selects would hit that fallback: a partition mixing some traces that carry their own ground truth with others that would fall back to the pooled value still reports available=True — the pooled-fallback traces are still individually rejected if you run it (each becomes a FAILED row, not a wrong score), so available=True never hides a bad number; a mixed partition just doesn't warn you in advance which rows will fail.

aip_sdk.partitions.MetricUnavailableReason.AMBIGUOUS_TRACE_GROUND_TRUTH​

aip_sdk.partitions.MetricUnavailableReason.AMBIGUOUS_TRACE_GROUND_TRUTH = 'AmbiguousTraceGroundTruth'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.OP_CONTRACT_INVALID​

aip_sdk.partitions.MetricUnavailableReason.OP_CONTRACT_INVALID = 'OpContractInvalid'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.OP_MISSING_COLUMNS​

aip_sdk.partitions.MetricUnavailableReason.OP_MISSING_COLUMNS = 'OpMissingColumns'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.OP_NOT_DEPLOYED​

aip_sdk.partitions.MetricUnavailableReason.OP_NOT_DEPLOYED = 'OpNotDeployed'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.OP_NOT_FOUND​

aip_sdk.partitions.MetricUnavailableReason.OP_NOT_FOUND = 'OpNotFound'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.OP_SCHEMA_INCOMPATIBLE​

aip_sdk.partitions.MetricUnavailableReason.OP_SCHEMA_INCOMPATIBLE = 'OpSchemaIncompatible'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.PARTITION_HAS_NO_OCCURRENCES​

aip_sdk.partitions.MetricUnavailableReason.PARTITION_HAS_NO_OCCURRENCES = 'PartitionHasNoOccurrences'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.PARTITION_TYPE_UNSUPPORTED​

aip_sdk.partitions.MetricUnavailableReason.PARTITION_TYPE_UNSUPPORTED = 'PartitionTypeUnsupported'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.REQUIRED_KINDS_ABSENT​

aip_sdk.partitions.MetricUnavailableReason.REQUIRED_KINDS_ABSENT = 'RequiredKindsAbsent'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.REQUIRED_SHAPE_UNSUPPORTED​

aip_sdk.partitions.MetricUnavailableReason.REQUIRED_SHAPE_UNSUPPORTED = 'RequiredShapeUnsupported'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.SCORER_CONTRACT_MISMATCH​

aip_sdk.partitions.MetricUnavailableReason.SCORER_CONTRACT_MISMATCH = 'ScorerContractMismatch'

No docstring is defined in the source.

aip_sdk.partitions.MetricUnavailableReason.TARGET_KIND_MISMATCH​

aip_sdk.partitions.MetricUnavailableReason.TARGET_KIND_MISMATCH = 'TargetKindMismatch'

No docstring is defined in the source.

aip_sdk.partitions.Partition​

aip_sdk.partitions.Partition

A partition persisted on a dataset version.

aip_sdk.partitions.Partition.created_at​

aip_sdk.partitions.Partition.created_at: datetime | None = None

No docstring is defined in the source.

aip_sdk.partitions.Partition.dataset_version_id​

aip_sdk.partitions.Partition.dataset_version_id: str

No docstring is defined in the source.

aip_sdk.partitions.Partition.id​

aip_sdk.partitions.Partition.id: str

No docstring is defined in the source.

aip_sdk.partitions.Partition.model_config​

aip_sdk.partitions.Partition.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.Partition.name​

aip_sdk.partitions.Partition.name: str

No docstring is defined in the source.

aip_sdk.partitions.Partition.partition_type​

aip_sdk.partitions.Partition.partition_type: PartitionType

No docstring is defined in the source.

aip_sdk.partitions.Partition.selector​

aip_sdk.partitions.Partition.selector: PartitionSelector

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability​

aip_sdk.partitions.PartitionMetricAvailability

Per-metric availability for one partition on one dataset version.

Carries verdicts only, never span payloads.

deployment_checked is False when the platform could not determine which metrics are deployed in the environment. The verdicts are then about the metric's contract alone: an available metric fits this partition but is not confirmed runnable, and no metric can report OP_NOT_DEPLOYED. It is True on a healthy platform.

ground_truth_checked is the same shape for a different gate: False means the platform could not read this TRACE partition's ground-truth annotation values, so agent.step_accuracy/agent.tool_selection_accuracy silently report no occurrence ambiguous on that one gate rather than a verified answer — see MetricUnavailableReason.AMBIGUOUS_TRACE_GROUND_TRUTH. Always True when the partition isn't TRACE-typed or neither of those two metrics was requested, since that gate could never fire there regardless.

aip_sdk.partitions.PartitionMetricAvailability.available_metrics​

aip_sdk.partitions.PartitionMetricAvailability.available_metrics: list[str]

The names of the metrics that can score this partition, in response order.

aip_sdk.partitions.PartitionMetricAvailability.dataset_version_id​

aip_sdk.partitions.PartitionMetricAvailability.dataset_version_id: str

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.deployment_checked​

aip_sdk.partitions.PartitionMetricAvailability.deployment_checked: bool = True

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.ground_truth_checked​

aip_sdk.partitions.PartitionMetricAvailability.ground_truth_checked: bool = True

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.metrics​

aip_sdk.partitions.PartitionMetricAvailability.metrics: list[MetricAvailability] = Field(default_factory=list[MetricAvailability])

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.model_config​

aip_sdk.partitions.PartitionMetricAvailability.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.partition_id​

aip_sdk.partitions.PartitionMetricAvailability.partition_id: str

No docstring is defined in the source.

aip_sdk.partitions.PartitionMetricAvailability.partition_type​

aip_sdk.partitions.PartitionMetricAvailability.partition_type: PartitionType

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome​

aip_sdk.partitions.PartitionMigrationOutcome

One partition the base version carried, and what became of it on the derived version.

aip_sdk.partitions.PartitionMigrationOutcome.model_config​

aip_sdk.partitions.PartitionMigrationOutcome.model_config = ConfigDict(extra='allow')

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome.name​

aip_sdk.partitions.PartitionMigrationOutcome.name: str

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome.needs_attention​

aip_sdk.partitions.PartitionMigrationOutcome.needs_attention: bool

Whether this target failed to follow the data across, so reason must be acted on.

aip_sdk.partitions.PartitionMigrationOutcome.outcome​

aip_sdk.partitions.PartitionMigrationOutcome.outcome: PartitionOutcome

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome.partition_id​

aip_sdk.partitions.PartitionMigrationOutcome.partition_id: str | None = None

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome.reason​

aip_sdk.partitions.PartitionMigrationOutcome.reason: str | None = None

No docstring is defined in the source.

aip_sdk.partitions.PartitionMigrationOutcome.source_partition_id​

aip_sdk.partitions.PartitionMigrationOutcome.source_partition_id: str

No docstring is defined in the source.

aip_sdk.partitions.PartitionOutcome​

aip_sdk.partitions.PartitionOutcome

What became of a partition when a new dataset version was derived from the one it sat on.

A partition is pinned to a dataset version, so a derivation carries it across explicitly; only NAME_COLLISION means the evaluation target did not follow the data.

aip_sdk.partitions.PartitionOutcome.ALREADY_PRESENT​

aip_sdk.partitions.PartitionOutcome.ALREADY_PRESENT = 'already_present'

No docstring is defined in the source.

aip_sdk.partitions.PartitionOutcome.MIGRATED​

aip_sdk.partitions.PartitionOutcome.MIGRATED = 'migrated'

No docstring is defined in the source.

aip_sdk.partitions.PartitionOutcome.NAME_COLLISION​

aip_sdk.partitions.PartitionOutcome.NAME_COLLISION = 'name_collision'

No docstring is defined in the source.

aip_sdk.partitions.create_partition​

aip_sdk.partitions.create_partition(dataset_id: str, version_id: str, *, name: str, selector: PartitionSelector, client: APIClient | None = None) -> Partition

Create a partition on a dataset version.

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID to attach the partition to.
  • name str: Partition name, unique within the version. Surrounding whitespace is trimmed.
  • selector PartitionSelector: The selector naming the evaluation target. partition_type on the created partition is derived from the selector. A SESSION or TRACE selector carries no target/ancestry_path; a SPAN selector may use them to narrow which spans match, or omit them to select every span.
  • client APIClient | None: Optional API client.

Returns

Raises

aip_sdk.partitions.get_dataset_metric_availability​

aip_sdk.partitions.get_dataset_metric_availability(dataset_id: str, version_id: str, *, metrics: Iterable[str] | None = None, has_connection: bool = True, client: APIClient | None = None) -> DatasetVersionMetricAvailability

Report which dataset (row-level) metrics can score a dataset version, and why the rest cannot.

Uses the same gate as POST /runs, so an available metric is one the run gate accepts. For agent-trace datasets, use aip.get_partition_metric_availability() instead.

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID to judge metrics against.
  • metrics Iterable[str] | None: Restrict the report to these metric names. An unmatched name is reported unavailable (OP_NOT_FOUND) rather than omitted. None reports every metric visible in the dataset's workspace.
  • has_connection bool: Whether inference will fill the produced columns (sut_response, retrieved_context) before scoring. Defaults to True. Pass False to judge the version's at-rest columns alone.
  • client APIClient | None: Optional API client.

Returns

Raises

aip_sdk.partitions.get_or_create_partition​

aip_sdk.partitions.get_or_create_partition(dataset_id: str, version_id: str, *, name: str, selector: PartitionSelector, client: APIClient | None = None) -> GetOrCreatePartitionResult

Create a partition, or reuse the existing one if this name is already taken.

For a script that may run more than once against the same dataset version — a demo, a notebook, a retry — this avoids choosing between failing on DuplicatePartitionError and hand-rolling a list_partitions() lookup on catch.

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID to attach the partition to.
  • name str: Partition name, unique within the version. Surrounding whitespace is trimmed.
  • selector PartitionSelector: The selector naming the evaluation target. Used only when creating; an existing partition of this name is reused only if its own stored selector matches this one — a name collision with a different selector raises rather than silently redirecting the evaluation to a different target.
  • client APIClient | None: Optional API client.

Returns

Raises

  • InvalidArgumentError: If name is blank or longer than 255 characters, or selector is inconsistent with its partition type.
  • AuthError: If credentials are missing or invalid.
  • ForbiddenError: If the caller lacks editor rights on the version's workspace.
  • NotFoundError: If the dataset version does not exist or belongs to a workspace the caller is not a member of, or a name collision is reported but no partition with this name is listed on the version (e.g. it was deleted concurrently — retry).
  • DuplicatePartitionError: If a partition of this name already exists with a different selector — the name is taken by something else, not an equivalent partition safe to reuse.
  • UnprocessableEntityError: If the version is not an agent-trace version.
  • ResponseParseError: If the platform's response does not match this SDK version.

aip_sdk.partitions.get_partition_metric_availability​

aip_sdk.partitions.get_partition_metric_availability(dataset_id: str, version_id: str, partition_id: str, *, metrics: Iterable[str] | None = None, client: APIClient | None = None) -> PartitionMetricAvailability

Report which trace metrics can score a partition, and why the rest cannot.

Each metric is judged against the span kinds the partition's occurrences actually carry and against the occurrence rows it would be scored on, so the verdict reflects this partition rather than the dataset as a whole. A partition narrowed to nothing reports PARTITION_HAS_NO_OCCURRENCES rather than an optimistic verdict.

A metric blocked with OP_MISSING_COLUMNS needs ground truth this version does not carry: attach it with aip.attach_ground_truth(), then re-check against the derived version and the target's new ID in migrated_partitions. One blocked with OP_NOT_DEPLOYED fits this partition but is not running in this environment — nothing about the data will unblock it, so ask whoever operates your platform to deploy it. One blocked with AMBIGUOUS_TRACE_GROUND_TRUTH (agent.step_accuracy / agent.tool_selection_accuracy only) is reported only when every occurrence a TRACE partition selects would score against its session's pooled ground truth for a session with more than one trace — both metrics reject that occurrence outright at scoring time rather than silently mis-scoring it, so a mixed partition (some traces with their own ground truth, some without) can still report available while the pooled-fallback traces are individually refused as FAILED rows if you run it; available=True never hides a bad number, a mixed partition just doesn't warn you in advance which rows will fail.

How closely this predicts run admission depends on the partition's granularity. For a SPAN partition the two agree by construction: run creation resolves the same stored selector and gates metrics against exactly these occurrences. For a TRACE or SESSION partition they can diverge — there the partition ID is a coarse provenance label on the results, since the selector narrows nothing when the whole trace or session is already the scope, so run creation gates metrics dataset-wide instead. Score the partition by passing its ID and the reported partition_type in a target to aip.run(pipeline="trace_metric_invoke", targets=[aip.RunTarget(partition_id=..., partition_type=...)]).

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID the partition is defined on.
  • partition_id str: ID of the partition to judge metrics against.
  • metrics Iterable[str] | None: Restrict the report to these metric names. A name that matches no trace metric is reported as unavailable with OP_NOT_FOUND rather than omitted, so a stale selection gets an answer. When None, every trace metric visible in the dataset's workspace is reported.
  • client APIClient | None: Optional API client.

Returns

Raises

aip_sdk.partitions.list_partitions​

aip_sdk.partitions.list_partitions(dataset_id: str, version_id: str, *, client: APIClient | None = None) -> list[Partition]

List the partitions defined on a dataset version.

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID.
  • client APIClient | None: Optional API client.

Returns

  • list[Partition]: The version's partitions, oldest first.

Raises

aip_sdk.partitions.resolve_partition​

aip_sdk.partitions.resolve_partition(dataset_id: str, version_id: str, partition_id: str, *, client: APIClient | None = None) -> list[ResolvedPartition]

Resolve a partition to the concrete canonical targets it selects.

Each occurrence yields one resolved partition — a SESSION selector resolves to a single session, a TRACE selector to one trace per trace in the version, and a SPAN selector to one span per matching span.

Every occurrence is returned in one response, each carrying its full canonical payload (a span's messages, a trace's spans), so cost scales with the version and the breadth of the selector rather than with a page size. Narrow the selector — a target and, if needed, an ancestry_path — when resolving a large trace version. To ask only which metrics could score the partition, use get_partition_metric_availability(), which returns verdicts instead of payloads.

Parameters

  • dataset_id str: Dataset ID.
  • version_id str: Dataset version ID.
  • partition_id str: ID of the partition to resolve.
  • client APIClient | None: Optional API client.

Returns

  • list[ResolvedPartition]: The resolved partitions, each a
  • list[ResolvedPartition]: class:~aip_sdk.trace_models.SessionPartition,
  • list[ResolvedPartition]: class:~aip_sdk.trace_models.TracePartition, or
  • list[ResolvedPartition]: class:~aip_sdk.trace_models.SpanPartition tagged by partition_type.

Raises