Skip to content

Commit

Permalink
fix _initialize_data_loaders in data_silo (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanag authored Aug 17, 2020
1 parent 153f4ed commit a903289
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions farm/data_handler/data_silo.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _save_dataset_to_cache(self):
def _initialize_data_loaders(self):
""" Initializing train, dev and test data loaders for the already loaded datasets """

if self.processor.train_filename:
if self.data["train"] is not None:
if self.distributed:
sampler_train = DistributedSampler(self.data["train"])
else:
Expand All @@ -343,7 +343,7 @@ def _initialize_data_loaders(self):
else:
data_loader_dev = None

if self.processor.test_filename:
if self.data["test"] is not None:
data_loader_test = NamedDataLoader(
dataset=self.data["test"],
sampler=SequentialSampler(self.data["test"]),
Expand Down

0 comments on commit a903289

Please sign in to comment.