nirs4all.data.config module
DatasetConfigs - Configuration and caching for dataset loading.
This module provides DatasetConfigs class that handles dataset configuration, name resolution, loader calls, and caching to avoid reloading the same dataset.
- class nirs4all.data.config.DatasetConfigs(configurations: Dict[str, Any] | List[Dict[str, Any]] | str | List[str], task_type: str | List[str] = 'auto', signal_type: str | SignalType | List[str | SignalType] | None = None, aggregate: str | bool | List[str | bool | None] | None = None, aggregate_method: str | List[str] | None = None, aggregate_exclude_outliers: bool | List[bool] | None = None)[source]
Bases:
object- get_dataset(config, name) SpectroDataset[source]
Get dataset by config and name (backward compatible).
Note: When called directly, uses the first task_type (or ‘auto’ if single dataset). For proper per-dataset task_type handling, use iter_datasets() or get_dataset_at().
- get_dataset_at(index) SpectroDataset[source]
- get_datasets() List[SpectroDataset][source]