mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-10-27 13:12:20 +08:00
fixing Win failed import (#1163)
* version * try fix distrib * update try import
This commit is contained in:
1 parent
49d000c0c9
commit
e461ec0037
8 files changed
+18
-19
No files matched your search
@@ -1,7 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Union, List, Tuple, Callable
|
||||
|
||||
import torch.distributed as dist
|
||||
import torch.distributed as torch_distrib
|
||||
from torch.utils.data import SequentialSampler, DataLoader
|
||||
from torch.utils.data.distributed import DistributedSampler
|
||||
|
||||
@@ -224,7 +224,7 @@ class TrainerDataLoadingMixin(ABC):
|
||||
# get the function we'll use to get data
|
||||
if self.use_ddp or self.use_ddp2:
|
||||
# all processes wait until data download has happened
|
||||
dist.barrier()
|
||||
torch_distrib.barrier()
|
||||
|
||||
# data download/load on TPU
|
||||
elif self.use_tpu and XLA_AVAILABLE:
|
||||
|
||||
Reference in new issue
Block a user