TFDS now supports the Croissant 🥐 format! Read the documentation to know more.

tfds.testing.DummyDatasetCollection

View source on GitHub

Minimal Dataset Collection builder.

Attributes

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
defdatasets(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
defdatasets(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

get_collection(
 version: Union[None, str, tfds.core.Version ] = None
) -> Mapping[str, naming.DatasetReference]

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

get_latest_version() -> str

Returns the latest version of this dataset collection.

list_datasets

View source

list_datasets(
 version: Union[None, str, tfds.core.Version ] = None
) -> str

Returns the datasets included in a versioned dataset collection.

Class Variables

name 'dummy_dataset_collection'

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024年04月26日 UTC.