mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-11 12:31:23 +08:00
fixing Win failed import (#1163)
* version * try fix distrib * update try import
This commit is contained in:
@@ -100,7 +100,7 @@ from subprocess import call
|
||||
from typing import Union
|
||||
|
||||
import torch
|
||||
import torch.distributed as dist
|
||||
import torch.distributed as torch_distrib
|
||||
|
||||
from pytorch_lightning.core.lightning import LightningModule
|
||||
from pytorch_lightning.loggers import LightningLoggerBase
|
||||
@@ -177,7 +177,7 @@ class TrainerIOMixin(ABC):
|
||||
# wait for all models to restore weights
|
||||
if self.use_ddp or self.use_ddp2:
|
||||
# wait for all processes to catch up
|
||||
dist.barrier()
|
||||
torch_distrib.barrier()
|
||||
|
||||
# wait for all models to restore weights
|
||||
if self.on_tpu and XLA_AVAILABLE:
|
||||
|
||||
Reference in New Issue
Block a user