vertebrae.datasets.identity

Explicit identities for dataset cache and reproducibility keys.

Classes

DatasetIdentity

An explicit, serializable policy for identifying a dataset.

Module Contents

class vertebrae.datasets.identity.DatasetIdentity[source]

An explicit, serializable policy for identifying a dataset.

Use one of the named constructors instead of instantiating this class directly. Content identities read all identity-bearing dataset values when first resolved. Datasets must be treated as immutable after their identity is resolved or derived.

classmethod declared(dataset_id, revision)[source]

Identify a caller-managed dataset revision without inspecting its content.

Parameters:
  • dataset_id (str)

  • revision (str)

Return type:

DatasetIdentity

classmethod from_manifest(dataset_id, manifest)[source]

Identify a dataset from a complete caller-provided manifest.

Parameters:
  • dataset_id (str)

  • manifest (Mapping[str, Any])

Return type:

DatasetIdentity

classmethod from_content()[source]

Explicitly identify a dataset by lazily hashing all of its content.

Return type:

DatasetIdentity

classmethod ephemeral()[source]

Create an explicit run-local identity that remains stable when serialized.

Return type:

DatasetIdentity

classmethod derived(parent_key, operation, recipe)[source]

Create an identity for a deterministic transformation of another dataset.

Parameters:
  • parent_key (str)

  • operation (str)

  • recipe (Any)

Return type:

DatasetIdentity

resolve(content=None)[source]

Resolve this policy to its stable SHA-256 identity key.

Parameters:

content (Any)

Return type:

str

descriptor(resolved_key)[source]

Return compact JSON-safe identity metadata without exposing manifest contents.

Parameters:

resolved_key (str)

Return type:

dict[str, Any]