[RFC] Introduce a dataloader factory class to better manage data modules #6776
Labels
feature
Is an improvement or enhancement
help wanted
Open to be worked on
won't fix
This will not be worked on
🚀 Feature
Create a new class to manage dataloaders
Proposal: https://docs.google.com/document/d/1c0dBmASUfQy0kIpliGD7sGmdzC0sgbuOQStkM02UySM/edit
Motivation
Pitch
We can add optional attributes inside of the datamodule for these classes, one for each of train/val/test/predict as a convenience, along with a convenience method to instantiate a datamodule from these factories similar to this: https://github.com/PyTorchLightning/pytorch-lightning/blob/a72a7992a283f2eb5183d129a8cf6466903f1dc8/pytorch_lightning/core/datamodule.py#L343-L398
This can also replace the raw dataloaders that are currently accepted on the Trainer.fit()/validate()/test()/predict() APIs - the classes here are an improvement as they can have access to trainer context which the existing dataloaders do not have.
cc @justusschock @awaelchli @carmocca
Alternatives
Additional context
The text was updated successfully, but these errors were encountered: