noether.core.factory.dataset

Classes

DatasetFactory

Specialized factory for datasets. Next to the standard instantiation of datasets, it also supports wrapping of the dataset inside dataset wrappers.

Module Contents

class noether.core.factory.dataset.DatasetFactory(dataset_wrapper_factory=None)

Bases: noether.core.factory.base.Factory

Specialized factory for datasets. Next to the standard instantiation of datasets, it also supports wrapping of the dataset inside dataset wrappers.

Example config:

kind: path.to.custom_dataset.CustomDataset
dataset_param1: value1
dataset_param2: value2
dataset_wrappers:
  - kind: noether.data.base.wrappers.SomeDatasetWrapper
    param1: value1
  - kind: noether.data.base.wrappers.AnotherDatasetWrapper
    param2: value2
Parameters:

dataset_wrapper_factory (noether.core.factory.base.Factory | None)

dataset_wrapper_factory
instantiate(dataset_config, **kwargs)

Instantiates the dataset either based on dataset_config

Parameters:
Returns:

The instantiated dataset, possibly wrapped in dataset wrappers specified in the configuration.

Return type:

Any