Don't use tqdm in ranks!=0

This commit is contained in:
James Betker 2021-12-28 10:06:54 -07:00
parent a12042ea99
commit 93624fa4b2

View File

@ -264,7 +264,7 @@ class Trainer:
self.epoch = epoch
if opt['dist']:
self.train_sampler.set_epoch(epoch)
tq_ldr = tqdm(self.train_loader)
tq_ldr = tqdm(self.train_loader) if self.rank == 0 else self.train_loader
_t = time()
for train_data in tq_ldr: