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 <ananth.subramaniam@gmail.com> * shuffling typo * Update CHANGELOG.md Co-authored-by: ananthsub <ananth.subramaniam@gmail.com> Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com>
This commit is contained in:
parent
e7057d5898
commit
7e2f7e956b
|
@ -124,6 +124,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
### Fixed
|
||||
|
||||
- Fixed ambiguous warning when both overfit and train dataloader shuffling are enabled ([#7685](https://github.com/PyTorchLightning/pytorch-lightning/pull/7685))
|
||||
|
||||
- Fixed dataloaders are not reset when tuning the model ([#7566](https://github.com/PyTorchLightning/pytorch-lightning/pull/7566))
|
||||
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ class TrainerDataLoadingMixin(ABC):
|
|||
if hasattr(self.train_dataloader, 'sampler') and isinstance(self.train_dataloader.sampler, RandomSampler):
|
||||
rank_zero_warn(
|
||||
'You requested to overfit but enabled training dataloader shuffling.'
|
||||
' We are turning it off for you.'
|
||||
' We are turning off the training dataloader shuffling for you.'
|
||||
)
|
||||
self.train_dataloader = self.replace_sampler(
|
||||
self.train_dataloader, SequentialSampler(self.train_dataloader.dataset)
|
||||
|
|
Loading…
Reference in New Issue