tfds.testing.DummyDatasetCollection

Minimal Dataset Collection builder.

all_versions Returns all versions available for the dataset collection.
datasets Returns the datasets included in the collection, ordered by version.

Users will need to overwrite this function when implementing their dataset collection.

The returned dictionary needs to contain the dataset collection versions as keys, and a dictionary of the included TFDS datasets as values.

@property
def datasets(self):
return {
    "1.0.0":
        naming.references_for({
            "yes_no": "yes_no:1.0.0",
            "sst2": "glue/sst:2.0.0",
            "assin2": "assin2:1.0.0",
        }),
    ...
}

Note that the above is equivalent to:

@property
def datasets(self):
return {
    "1.0.0": {
        "yes_no":
            naming.DatasetReference(
                dataset_name="yes_no", version="1.0.0"),
        "sst2":
            naming.DatasetReference(
                dataset_name="glue", config="sst2", version="2.0.0"),
        "assin2":
            naming.DatasetReference(
                dataset_name="assin2", version="1.0.0"),
    },
    ...
}

info

Methods

get_collection

View source

Returns the requested versioned dataset collection.

Args
version The requested version. If no version is specified, returns the most recently added version.

Returns
The requested dataset collection.

get_latest_version

View source

Returns the latest version of this dataset collection.

list_datasets

View source

Returns the datasets included in a versioned dataset collection.

name 'dummy_dataset_collection'