Dataset Versions

Dataset Versions

A dataset can have multiple versions.

Get all dataset versions

dataset_versions = client.get_dataset_versions(my_dataset.id)
ParameterTypeDescription
dataset_idstrThe dataset id

Create dataset version

new_dataset_version = DatasetVersion(
    name= "v2",
    description= "Even more images of dogs and cats"
)

new_dataset_version = client.create_dataset_version(my_dataset.id, new_dataset_version)
new_dataset_version
ParameterTypeDescription
dataset_idstrThe dataset id
dataset_versionDatasetVersionThe dataset version object

Datast properties in detail:

PropertyTypeDescription
idstrUnique id for the dataset
created_atstrThe creation date
updated_atstrLast updated date
namestrThe dataset version name
descriptionstrThe dataset version description
user_idstrThe unique id of the dataset creator
labelsList[Label]A list of the labels in this version
dataset_idstrThe id of the dataset this version belongs to
splitsList[DatasetSplit]A list of splits in this dataset version
default_splitstrThe id of split that will be displayed by default
configstrVersion specific configuration

Get a dataset version

dataset_version = client.get_dataset_version(new_dataset_version.dataset_id, new_dataset_version.id)
ParameterTypeDescription
dataset_idstrThe dataset id

Update a dataset version

new_dataset_version.description = "Even more image of cats and dogs."

client.update_dataset_version(my_dataset.id, new_dataset_version)
ParameterTypeDescription
dataset_idstrThe dataset id
dataset_versionDatasetVersionThe dataset version object

Delete a dataset version

client.delete_dataset_version(my_dataset.id, new_dataset_version)
ParameterTypeDescription
dataset_idstrThe dataset id
dataset_versionDatasetVersionThe dataset version object