mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
fixed ddp crash
This commit is contained in:
1 parent
3f76152470
commit
7da133d91d
1 file changed
+2
-2
@@ -178,9 +178,9 @@ class Trainer(TrainerIO):
|
||||
self.use_ddp = distributed_backend == 'ddp'
|
||||
|
||||
# use ddp automatically if nb_gpu_nodes > 1
|
||||
if nb_gpu_nodes > 1:
|
||||
if nb_gpu_nodes > 1 and self.use_dp:
|
||||
self.use_ddp = True
|
||||
self.use_ddp = False
|
||||
self.use_dp = False
|
||||
w = 'DataParallel does not support nb_gpu_nodes > 1. ' \
|
||||
'Switching to DistributedDataParallel for you. ' \
|
||||
'To silence this warning set distributed_backend=ddp'
|
||||
|
||||
Reference in new issue
Block a user