noether.core.factory.dataset¶
Classes¶
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.FactorySpecialized 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:
dataset_config (noether.core.schemas.dataset.DatasetBaseConfig) – Configuration for the dataset. See
DatasetBaseConfigfor available options including dataset wrappers.**kwargs – Additional keyword arguments provided to the parent class.
- Returns:
The instantiated dataset, possibly wrapped in dataset wrappers specified in the configuration.
- Return type:
Any