Skip to content

Commit

Permalink
fix _reset_eval_dataloader() for IterableDataset (#1560)
Browse files Browse the repository at this point in the history
* removed if dl from _reset_eval_dataloader()

* changed to if dl != None to be more safe

* hints from pep8speaks

Co-authored-by: ybrovman <ybrovman@ebay.com>
  • Loading branch information
ybrovman and ybrovman authored May 5, 2020
1 parent fc7f591 commit 35bbe17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/trainer/data_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _reset_eval_dataloader(self, model: LightningModule, mode: str) -> Tuple[int
' this off for validation and test dataloaders.')

# add samplers
dataloaders = [self.auto_add_sampler(dl, train=False) for dl in dataloaders if dl]
dataloaders = [self.auto_add_sampler(dl, train=False) for dl in dataloaders if dl is not None]

num_batches = 0

Expand Down

0 comments on commit 35bbe17

Please sign in to comment.