From 5264f888e43a5c23632e942c8769e1497f3c50fc Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Sun, 23 Aug 2020 10:40:38 +0800 Subject: [PATCH] fix iterable dataset (issue 9899) (#9952) --- python/ray/util/sgd/torch/distributed_torch_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/util/sgd/torch/distributed_torch_runner.py b/python/ray/util/sgd/torch/distributed_torch_runner.py index 77ade0b9d..3ab4bd841 100644 --- a/python/ray/util/sgd/torch/distributed_torch_runner.py +++ b/python/ray/util/sgd/torch/distributed_torch_runner.py @@ -140,7 +140,7 @@ class DistributedTorchRunner(TorchRunner): if self.add_dist_sampler: self.train_loader = with_sampler(self.train_loader) - if self.validation_loader and should_wrap_dataloader( + if self.validation_loader is not None and should_wrap_dataloader( self.validation_loader): if self.add_dist_sampler: self.validation_loader = with_sampler(self.validation_loader)