Update trainer.py

This commit is contained in:
William Falcon 2019-07-16 17:02:21 -04:00 committed by GitHub
parent a83588b14e
commit a41abad5b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ class Trainer(TrainerIO):
self.test_dataloader = model.test_dataloader self.test_dataloader = model.test_dataloader
self.val_dataloader = model.val_dataloader self.val_dataloader = model.val_dataloader
if self.data_parallel and not issubclass(self.tng_dataloader.sampler, DistributedSampler): if self.data_parallel and not isinstance(self.tng_dataloader.sampler, DistributedSampler):
msg = ''' msg = '''
when using multiple gpus and multiple nodes you must pass a DistributedSampler to DataLoader(sampler). when using multiple gpus and multiple nodes you must pass a DistributedSampler to DataLoader(sampler).