tfds.testing.DummyDatasetCollection
Minimal Dataset Collection builder.
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"),
},
...
}
Attributes | |
|---|---|
all_versions
|
Returns all versions available for the dataset collection. |
datasets
|
Returns the datasets included in the collection, ordered by version. |
info
|
|
Methods
get_collection
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
get_latest_version() -> str
Returns the latest version of this dataset collection.
list_datasets
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'
|