espnet3.components.data.data_organizer.DatasetConfig
Less than 1 minute
espnet3.components.data.data_organizer.DatasetConfig
class espnet3.components.data.data_organizer.DatasetConfig(name: str, dataset: Dict[str, Any] = None, transform: Dict[str, Any] | None = None)
Bases: object
Configuration class for dataset metadata and construction.
This class encapsulates the necessary fields to define and instantiate a dataset. Used with Hydra to allow modular and flexible configuration via YAML or dictionaries.
name
Name identifier for the dataset.
- Type: str
path
Optional path or ID required for dataset instantiation.
- Type: Optional[str]
dataset
A dictionary for Hydra instantiation of the dataset.
- Type: Dict[str, Any]
transform
A dictionary for Hydra instantiation of a transform applied to each sample after loading.
- Type: Optional[Dict[str, Any]]
Example
>>> config_dict = {
... "name": "custom",
... "dataset": {
... "_target_": "my_project.datasets.MyDataset",
... },
... "transform": {
... "_target_": "my_project.transforms.uppercase_transform"
... }
... }
>>> config = DatasetConfig(**config_dict)dataset
name
transform
