aip_sdk.iter_ground_truth
aip_sdk.iter_ground_truth(version_id: str, *, page_size: int = 500, client: APIClient | None = None) -> Iterator[TraceGroundTruthRow]
Iterate every annotated identifier on a dataset version.
Pages are fetched lazily as the iterator is consumed, so no page is held beyond the rows yielded from it. This bounds each response, not the platform's own read — the artifact is decoded whole to serve any page, and the upload size limit is what keeps that bounded.
Parameters
version_idstr: Dataset version to read.page_sizeint: Identifiers to fetch per request (1 toMAX_GROUND_TRUTH_ROWS_PER_PAGE). Affects only request granularity.clientAPIClient | None: Optional API client.
Yields
TraceGroundTruthRow: Each annotated identifier and its values, ordered by identifier.
Raises
InvalidArgumentError: Ifpage_sizeis 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.