torchcell.datamodules

PyTorch Lightning data modules for training on cell datasets. CellDataModule builds train, validation and test splits of a cell dataset and caches the split indices, and the perturbation_subset module’s data module draws a size-limited subset of those splits. The split-index records (DataModuleIndex and related models) are pydantic objects, cached as JSON in the data module’s cache directory.

Classes

CellDataModule

Lightning data module that splits a cell dataset and builds dataloaders.

IndexSplit

A sorted list of indices together with its element count.

DatasetSplit

Per-split index groupings keyed by phenotype, perturbation count, or dataset.

DataModuleIndex

Train/val/test index lists that are sorted and mutually non-overlapping.

DataModuleIndexDetails

Detailed per-split index breakdown with summary reporting.