peal.data.dataset_factory

Build the train / validation / test datasets described by a DataConfig.

This is the entry point every PEAL training script, adaptor and explainer uses to turn a data yaml into PealDataset instances. It assembles the torchvision transform pipelines (invariance augmentations for training, deterministic resizing and cropping for evaluation), resolves the dataset class from config.dataset_class or the input/output type, computes dataset statistics for normalization when requested, and attaches the normalization and task config to the returned datasets.

Functions

get_datasets

Instantiate the train, validation and test datasets of a data config.