Dataset

class Dataset(owner, dataset_id, creation_time, expiration_time, dataset_name, verbose, data=None)

A dataset should not be constructed directly. It is constructed by the hub client through qai_hub.upload_dataset(), qai_hub.get_dataset() or qai_hub.get_datasets().

dataset_id

The dataset ID.

Type:

str

creation_time

The time this dataset was created.

Type:

datetime

dataset_name

Name of this dataset

Type:

str

expiration_time

The time this dataset will expire.

Type:

datetime

disable_sharing()

Disable all sharing for this dataset.

Note that the dataset will still be accessible by users with which related job(s) are shared.

Return type:

None

download(filename=None)

Downloads the dataset entries either to memory or to an h5py (.h5) file.

Parameters:

filename (Optional[str]) – If filename is specified the dataset is downloaded to file, otherwise to memory. If the filename doesn’t end with the correct file extension, the appropriate file extension is added to the name.

Returns:

Loaded data instance or file name.

Return type:

DatasetEntries | str

get_sharing()

Get the list of email addresses of users that this dataset has been shared with.

Return type:

List[str]

modify_sharing(add_emails=[], delete_emails=[])

Modifies the list of users that the dataset is shared with.

Return type:

None