Skip to content

History APIs

deeplake.History

The version history of a deeplake.Dataset.

__getitem__

__getitem__(offset: int) -> Version
__getitem__(version: str) -> Version
__getitem__(input: int | str) -> Version

__iter__

__iter__() -> Iterator[Version]

Iterate over the history, starting at the initial version

__len__

__len__() -> int

The number of versions within the history

deeplake.Version

An atomic change within deeplake.Dataset's history

client_timestamp property

client_timestamp: datetime

When the version was created, according to the writer's local clock.

This timestamp is not guaranteed to be accurate, and deeplake.Version.timestamp should generally be used instead.

id property

id: str

The unique version identifier

message property

message: str | None

The description of the version provided at commit time.

open

open() -> ReadOnlyDataset

Fetches the dataset corresponding to the version

timestamp property

timestamp: datetime

The version timestamp.

This is based on the storage provider's clock, and so generally more accurate than deeplake.Version.client_timestamp.

deeplake.Tags

Provides access to the tags within a dataset.

It is returned by the deeplake.Dataset.tags property.

__getitem__

__getitem__(name: str) -> Tag

Return a tag by name

__len__

__len__() -> int

The total number of tags in the dataset

names

names() -> list[str]

Return a list of tag names

deeplake.TagsView

Provides access to the tags within a dataset.

It is returned by the deeplake.Dataset.tags property on a deeplake.ReadOnlyDataset.

__getitem__

__getitem__(name: str) -> TagView

Return a tag by name

__len__

__len__() -> int

The total number of tags in the dataset

names

names() -> list[str]

Return a list of tag names

deeplake.Tag

Describes a tag within the dataset.

Tags are created using deeplake.Dataset.tag.

delete

delete() -> None

Deletes the tag from the dataset

id property

id: str

The unique identifier of the tag

name property

name: str

The name of the tag

open

open() -> DatasetView

Fetches the dataset corresponding to the tag

open_async

open_async() -> Future

Asynchronously fetches the dataset corresponding to the tag and returns a Future object.

rename

rename(new_name: str) -> None

Renames the tag within the dataset

version property

version: str

The version that has been tagged

deeplake.TagView

Describes a read-only tag within the dataset.

Tags are created using deeplake.Dataset.tag.

id property

id: str

The unique identifier of the tag

name property

name: str

The name of the tag

open

open() -> DatasetView

Fetches the dataset corresponding to the tag

open_async

open_async() -> Future

Asynchronously fetches the dataset corresponding to the tag and returns a Future object.

version property

version: str

The version that has been tagged