Skip to content

Commit 99951a1

Browse files
committed
discard distributed
1 parent 628ebda commit 99951a1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/get_dataloader.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414

15-
def get_data_loader(cfg, mode='train', distributed=True):
15+
def get_data_loader(cfg, mode='train'):
1616
if mode == 'train':
1717
trans_func = T.TransformationTrain(cfg.scales, cfg.cropsize)
1818
batchsize = cfg.ims_per_gpu
@@ -28,7 +28,7 @@ def get_data_loader(cfg, mode='train', distributed=True):
2828

2929
ds = eval(cfg.dataset)(cfg.im_root, annpath, trans_func=trans_func, mode=mode)
3030

31-
if distributed:
31+
if dist.is_initialized():
3232
assert dist.is_available(), "dist should be initialzed"
3333
if mode == 'train':
3434
assert not cfg.max_iter is None

tools/train_amp.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,9 @@ def set_meters():
121121

122122
def train():
123123
logger = logging.getLogger()
124-
is_dist = dist.is_initialized()
125124

126125
## dataset
127-
dl = get_data_loader(cfg, mode='train', distributed=is_dist)
126+
dl = get_data_loader(cfg, mode='train')
128127

129128
## model
130129
net, criteria_pre, criteria_aux = set_model(dl.dataset.lb_ignore)

0 commit comments

Comments
 (0)