Skip to main content

aip_sdk.get_ground_truth

aip_sdk.get_ground_truth(version_id: str, *, limit: int = 200, offset: int = 0, client: APIClient | None = None) -> TraceGroundTruth

Read the ground truth a dataset version carries.

columns and row_count always describe the whole artifact, so read TraceGroundTruthVersion.ground_truth_columns or these fields to learn which columns exist rather than paging; prefer iter_ground_truth() to walk every row.

Parameters

  • version_id str: Dataset version to read.
  • limit int: Maximum annotated identifiers to return (1 to MAX_GROUND_TRUTH_ROWS_PER_PAGE).
  • offset int: Number of identifiers to skip, for pagination.
  • client APIClient | None: Optional API client.

Returns

  • TraceGroundTruth: The version's ground truth, with one page of rows ordered by identifier. A version
  • TraceGroundTruth: with none attached returns empty columns and rows rather than raising.

Raises

  • InvalidArgumentError: If limit or offset is out of range.
  • AuthError: If credentials are missing or invalid.
  • NotFoundError: If the dataset version does not exist, or belongs to a workspace the caller is not a member of.
  • ResponseParseError: If the platform's response does not match this SDK version.