Updates docs to clarify train_dataloader usage by batch_size_finder (#13171)

* batchfinder clarification

* fix according to precommit hook
This commit is contained in:
Sebastian Raschka 2022-05-31 19:22:31 -05:00 committed by GitHub
parent 011684a05f
commit 2876ab0ac3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -119,7 +119,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Deprecated `pytorch_lightning.core.lightning.LightningModule` in favor of `pytorch_lightning.core.module.LightningModule` ([#12740](https://github.com/PyTorchLightning/pytorch-lightning/pull/12740))
- Deprecated `Trainer.reset_train_val_dataloaderrs()` in favor of `Trainer.reset_{train,val}_dataloader` ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
- Deprecated `Trainer.reset_train_val_dataloaders()` in favor of `Trainer.reset_{train,val}_dataloader` ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
### Removed
@ -241,7 +241,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed issue where the CLI could not pass a `Profiler` to the `Trainer` ([#13084](https://github.com/PyTorchLightning/pytorch-lightning/pull/13084))
- Fixed logging on step level for eval mode ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
- Fixed logging's step values when multiple dataloaders are used during evaluation ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
-

View File

@ -143,6 +143,12 @@ search for batch sizes larger than the size of the training dataset.
datamodule = LitDataModule(batch_size=32)
trainer.tune(model, datamodule=datamodule)
Note that the ``train_dataloader`` can be either part of
the ``LightningModule`` or ``LightningDataModule``
as shown above. If both the ``LightningModule``
and the ``LightningDataModule`` contain a ``train_dataloader``,
the ``LightningDataModule`` takes precedence.
.. warning::
Due to the constraints listed above, this features does *NOT* work when passing dataloaders directly