factory module¶
Dataset factory¶
This module contains a factory
to instantiate a Dataset
from its class name.
The class can be internal to GEMSEO or located in an external module whose path
is provided to the constructor. It also provides a list of available cache
types and allows you to test if a cache type is available.
Classes:
This factory instantiates a |
- class gemseo.problems.dataset.factory.DatasetFactory[source]¶
Bases:
object
This factory instantiates a
Dataset
from its class name.The class can be internal to GEMSEO or located in an external module whose path is provided to the constructor.
Initializes the factory: scans the directories to search for subclasses of Dataset.
Searches in “GEMSEO_PATH” and gemseo.mlearning.p_datasets
Methods:
create
(dataset, **options)Create a dataset.
is_available
(dataset)Checks the availability of a dataset.
Attributes:
Lists the available datasets.
- create(dataset, **options)[source]¶
Create a dataset.
- Parameters
dataset (str) – name of the dataset (its classname).
options – additional options specific
- Returns
dataset
- Return type
- property datasets¶
Lists the available datasets.
- Returns
the list of datasets.
- Return type
list(str)