Skip to content

Commit 7e2f7e9

Browse files
Lucklyricananthsubawaelchlicarmocca
authored
fix: improve UserWarning message (#7685)
* fix: improve UserWarning message when both overfit and training dtaloader shuffling are enabled fixes issue: #7656 * chore: update changelog * Polish userwarning msg in pytorch_lightning/trainer/data_loading.py Co-authored-by: ananthsub <[email protected]> * shuffling typo * Update CHANGELOG.md Co-authored-by: ananthsub <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
1 parent e7057d5 commit 7e2f7e9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
124124

125125
### Fixed
126126

127+
- Fixed ambiguous warning when both overfit and train dataloader shuffling are enabled ([#7685](https://github.com/PyTorchLightning/pytorch-lightning/pull/7685))
128+
127129
- Fixed dataloaders are not reset when tuning the model ([#7566](https://github.com/PyTorchLightning/pytorch-lightning/pull/7566))
128130

129131

pytorch_lightning/trainer/data_loading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def reset_train_dataloader(self, model: LightningModule) -> None:
238238
if hasattr(self.train_dataloader, 'sampler') and isinstance(self.train_dataloader.sampler, RandomSampler):
239239
rank_zero_warn(
240240
'You requested to overfit but enabled training dataloader shuffling.'
241-
' We are turning it off for you.'
241+
' We are turning off the training dataloader shuffling for you.'
242242
)
243243
self.train_dataloader = self.replace_sampler(
244244
self.train_dataloader, SequentialSampler(self.train_dataloader.dataset)

0 commit comments

Comments
 (0)