From 13e8e6ca7d6021d89feb33ac6b3b96121decfdf7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 9 Aug 2020 19:01:22 -0700 Subject: [PATCH] DDP update --- train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index d591625cc142..108c9269bd00 100644 --- a/train.py +++ b/train.py @@ -51,7 +51,8 @@ def train(hyp, opt, device, tb_writer=None): init_seeds(2 + rank) with open(opt.data) as f: data_dict = yaml.load(f, Loader=yaml.FullLoader) # model dict - check_dataset(data_dict) # check + with torch_distributed_zero_first(rank): + check_dataset(data_dict) # check train_path = data_dict['train'] test_path = data_dict['val'] nc, names = (1, ['item']) if opt.single_cls else (int(data_dict['nc']), data_dict['names']) # number classes, names