Loader class for dataset collections.
tfds.core.DatasetCollectionLoader(
    collection: dataset_collection_builder.DatasetCollection,
    requested_version: Optional[str] = None,
    loader_kwargs: Optional[Dict[str, Any]] = None
)
| Attributes | 
|---|
| collection | the DatasetCollection to load. | 
| requested_version | optional version of the dataset collection to load. If
none given, the latest version will be loaded. | 
| loader_kwargs | optional kwargs for the tfds.loadfunction. | 
| datasets | initialized post-init, defines the datasets comprised in the
requested dataset collection. | 
| collection_name | the name of the DatasetCollection to load. | 
Methods
get_dataset_info
View source
get_dataset_info(
    dataset_name: str
)
load_all_datasets
View source
load_all_datasets(
    split: Optional[Tree[splits_lib.SplitArg]] = None,
    loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, Mapping[str, tf.data.Dataset]]
Loads all datasets of a collection.
| Args | 
|---|
| split | which split(s) of the datasets to load. | 
| loader_kwargs | dict(optional), keyword arguments to be passed to thetfds.loadfunction. Refer totfds.loaddocumentation for a
comperehensive overview of the different loading options. | 
| Returns | 
|---|
| dictofdataset_namesmapping to adictof {split_name:
tf.data.Dataset} for each desired datasets. | 
load_dataset
View source
load_dataset(
    dataset: str,
    split: Optional[Tree[splits_lib.SplitArg]] = None,
    loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, tf.data.Dataset]
Loads the named dataset from a dataset collection by calling tfds.load.
| Args | 
|---|
| dataset | str, the dataset name to load. | 
| split | which split(s) of the dataset to load. If None, will return all
splits available for the dataset. | 
| loader_kwargs | dict(optional), keyword arguments to be passed to thetfds.loadfunction. Refer totfds.loaddocumentation for a
comperehensive overview of the different loading options. | 
| Returns | 
|---|
| A dictof {str: tf.data.Dataset} for the desided dataset. | 
| Raises | 
|---|
| KeyError | if trying to load a dataset not included in the collection. | 
| RuntimeError | if loadreturn type is not adictor alist. | 
load_datasets
View source
load_datasets(
    datasets: Iterable[str],
    split: Optional[Tree[splits_lib.SplitArg]] = None,
    loader_kwargs: Optional[Dict[str, Any]] = None
) -> Mapping[str, Mapping[str, tf.data.Dataset]]
Loads a number of datasets from the dataset collection.
| Args | 
|---|
| datasets | dataset names to load. | 
| split | which split(s) of the datasets to load. | 
| loader_kwargs | keyword arguments to be passed to the tfds.loadfunction.
Refer totfds.loaddocumentation for a comperehensive overview of the
different loading options. | 
| Returns | 
|---|
| mapping between a dataset name and a mapping of split name to
tf.data.Dataset for each requested dataset. | 
| Raises | 
|---|
| ValueError | if no dataset(s) to load are given. | 
print_datasets
View source
print_datasets() -> None
print_info
View source
print_info() -> None
Prints information about this dataset collection.
set_loader_kwargs
View source
set_loader_kwargs(
    loader_kwargs: Dict[str, Any]
)
__eq__
__eq__(
    other
)
| Class Variables | 
|---|
| loader_kwargs | None | 
| requested_version | None |