Skip to content

trulens.core.schema.dataset

trulens.core.schema.dataset

Serializable dataset-related classes.

Classes

Dataset

Bases: SerialModel, Hashable

The class that holds the metadata of a dataset stored in the DB.

Attributes
name instance-attribute
name: str

The name of the dataset.

meta instance-attribute
meta: Metadata

Metadata associated with the dataset.

dataset_id instance-attribute
dataset_id: DatasetID = dataset_id

The unique identifier for the dataset.

Functions
__repr__
__repr__() -> str

Safe repr that handles circular references.

Pydantic's default __repr__ does not guard against circular references among model instances, which leads to RecursionError (see GitHub issue #1862). This override uses the same formatted_objects context-variable that __rich_repr__ uses so that already-visited objects are replaced with a short placeholder instead of recursing infinitely.

__rich_repr__
__rich_repr__() -> Result

Requirement for pretty printing using the rich package.