Properties
name
Name of this Dataset
Methods
add_tags
add_tags(
tags: Union[Tag, list[Tag]]
)
Description
Add some tags to an object.
It can be used on Data/MultiData/Asset/MultiAsset/DatasetVersion/Dataset/Model/ModelVersion.
You can give a Tag or a list of Tag.
Examples
tag_bicycle = client.create_tag("bicycle", Target.DATA)
tag_car = client.create_tag("car", Target.DATA)
tag_truck = client.create_tag("truck", Target.DATA)
data.add_tags(tag_bicycle)
data.add_tags([tag_car, tag_truck])
get_tags
get_tags()
Description
Retrieve the tags of your dataset.
Examples
tags = foo_dataset.get_tags()
assert tags[0].name == "my-dataset-1"
Returns
List of Tag objects
delete
delete()
Description
Delete a dataset.
⚠️ DANGER ZONE: Be very careful here!
It will remove this dataset from our database, its versions with their assets and annotations will be removed.
It will also remove potential annotation campaigns of this dataset versions.
Examples
foo_dataset.delete()
update
update(
name: Optional[str] = None, private: Optional[bool] = None,
description: Optional[str] = None
)
Description
Update name, private or description of this Dataset.
Examples
dataset.update(description='My favourite dataset')
Arguments
-
name (str, optional) : New name of the dataset. Defaults to None.
-
private (bool, optional) : New private of the dataset. Defaults to None.
-
description (str, optional) : New description of the dataset. Defaults to None.
list_versions
list_versions(
limit: Optional[int] = None, offset: Optional[int] = None,
order_by: Optional[list[str]] = None
)
Description
List all versions of this dataset
Examples
dataset.list_versions()
Arguments
-
limit (int, optional) : limit of versions to retrieve. Defaults to None.
-
offset (int, optional) : offset to start retrieving versions. Defaults to None.
-
order_by (list[str], optional) : fields to order by. Defaults to None.
Returns
List of DatasetVersion objects
get_version
get_version(
version: str
)
Description
Retrieve one version of a dataset
Examples
my_dataset_version = my_dataset.get_version("first")
Arguments
- version (str) : version name to retrieve
Returns
a DatasetVersion object
get_version_by_id
get_version_by_id(
id: Union[UUID, str]
)
Description
Retrieve one version of a dataset
Examples
my_dataset_version = my_dataset.get_version_by_id("918351d2-3e96-4970-bb3b-420f33ded895")
Arguments
- id (UUID) : id of the version to retrieve
Returns
a DatasetVersion object
create_version
create_version(
version: str, description: str = '', type: Union[InferenceType,
str] = InferenceType.NOT_CONFIGURED
)
Description
Create a version of this dataset.
A versioned dataset DatasetVersion takes Data from Datalake and transform it as annotable Asset.
Examples
foo_dataset = client.create_dataset('foo_dataset')
foo_dataset_version_1 = foo_dataset.create_version('first')
some_data = client.get_datalake().list_data(limit=10)
foo_dataset_version_1.add_data(some_data)
Arguments
-
version (str) : version name
-
description (str) : description of this version
-
type (InferenceType) : type of this version
Returns
A DatasetVersion manipulable that can receive data
list_workers
list_workers()
Description
List all workers of this dataset
Examples
dataset.list_workers()
Returns
List of Worker objects
find_worker
find_worker(
username: str
)
Description
Find worker of this dataset from its username
Examples
dataset.find_worker("John")
Arguments
- username (str) : username of the worker on the platform
Returns
A Worker object