diff --git a/pytorch_lightning/trainer/data_loading.py b/pytorch_lightning/trainer/data_loading.py index 0428f4951e..3557e2c83a 100644 --- a/pytorch_lightning/trainer/data_loading.py +++ b/pytorch_lightning/trainer/data_loading.py @@ -218,6 +218,9 @@ class TrainerDataLoadingMixin(ABC): f'Your {mode}_dataloader has shuffle=True, it is best practice to turn' ' this off for validation and test dataloaders.') + if any([dl is None for dl in dataloaders]): + rank_zero_warn("One of given dataloaders is None and it will be skipped.") + # add samplers dataloaders = [self.auto_add_sampler(dl, train=False) for dl in dataloaders if dl is not None]