peal.data

Datasets, dataloaders and the DataConfig schema they are built from.

interfaces.PealDataset / DataConfig define what every dataset offers the rest of PEAL (normalization round trips, contrastive collages, task configs); datasets and custom_datasets implement the image datasets (CelebA, Waterbirds, Square, ImageNet pairs, MNIST variants, …), tabular_datasets the tabular ones and dataset_generators synthesise confounded datasets. dataset_factory.get_datasets returns the train / validation / test splits for a config and dataloaders adds the DataloaderMixer / WeightedDataloaderList used to mix counterfactual data into predictor training.

Submodules

custom_datasets

Dataset classes for the concrete benchmarks PEAL experiments run on.

dataloaders

Dataloader construction and mixing for PEAL training loops.

dataset_factory

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

dataset_generators

Generators for PEAL's synthetic and confounded benchmark datasets.

dataset_utils

Label-file parsers that turn csv/json annotations into tensors and split keys.

datasets

Concrete PealDataset implementations for tabular and image data.

interfaces

Base dataset class and the pydantic DataConfig shared by all PEAL data.

tabular_datasets

Tabular datasets for the symbolic (non-image) CFKD/DiDAE experiments.

transformations

Callable image transformations used by PEAL datasets and generators.