Lightning-AI / pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.51k stars 3.39k forks source link

Add documentation for `Trainer.datamodule` #14211

Closed KralaBenjamin closed 2 years ago

KralaBenjamin commented 2 years ago

📚 Documentation

The possibility of accessing the datamodule via the trainer is not documented, but is only made apparent via texts in forums such as stackoverflow or github. It should also be documented that the data module should not be exchanged during the training process.


If you enjoy Lightning, check out our other projects! âš¡

cc @borda @rohitgr7 @carmocca @awaelchli @ananthsub @ninginthecloud @jjenniferdai

awaelchli commented 2 years ago

First I think it could be added here: https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html#properties And then also be mentioned perhaps here: https://pytorch-lightning.readthedocs.io/en/stable/data/datamodule.html?highlight=datamodule

A PR on this would be very welcomed if you are looking to contribute!