Skip to content

Commit 2876ab0

Browse files
authored
Updates docs to clarify train_dataloader usage by batch_size_finder (Lightning-AI#13171)
* batchfinder clarification * fix according to precommit hook
1 parent 011684a commit 2876ab0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
119119
- Deprecated `pytorch_lightning.core.lightning.LightningModule` in favor of `pytorch_lightning.core.module.LightningModule` ([#12740](https://github.com/PyTorchLightning/pytorch-lightning/pull/12740))
120120

121121

122-
- Deprecated `Trainer.reset_train_val_dataloaderrs()` in favor of `Trainer.reset_{train,val}_dataloader` ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
122+
- Deprecated `Trainer.reset_train_val_dataloaders()` in favor of `Trainer.reset_{train,val}_dataloader` ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
123123

124124
### Removed
125125

@@ -241,7 +241,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
241241
- Fixed issue where the CLI could not pass a `Profiler` to the `Trainer` ([#13084](https://github.com/PyTorchLightning/pytorch-lightning/pull/13084))
242242

243243

244-
- Fixed logging on step level for eval mode ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
244+
- Fixed logging's step values when multiple dataloaders are used during evaluation ([#12184](https://github.com/PyTorchLightning/pytorch-lightning/pull/12184))
245245

246246

247247
-

docs/source/advanced/training_tricks.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ search for batch sizes larger than the size of the training dataset.
143143
datamodule = LitDataModule(batch_size=32)
144144
trainer.tune(model, datamodule=datamodule)
145145
146+
Note that the ``train_dataloader`` can be either part of
147+
the ``LightningModule`` or ``LightningDataModule``
148+
as shown above. If both the ``LightningModule``
149+
and the ``LightningDataModule`` contain a ``train_dataloader``,
150+
the ``LightningDataModule`` takes precedence.
151+
146152
.. warning::
147153

148154
Due to the constraints listed above, this features does *NOT* work when passing dataloaders directly

0 commit comments

Comments
 (0)