Browse Source

Disable `pbar` for DDP ranks > 0 (#7440)

modifyDataloader
Glenn Jocher GitHub 2 years ago
parent
commit
c9a3b14a74
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py View File

@@ -522,7 +522,7 @@ class LoadImagesAndLabels(Dataset):
self.im_hw0, self.im_hw = [None] * n, [None] * n
fcn = self.cache_images_to_disk if cache_images == 'disk' else self.load_image
results = ThreadPool(NUM_THREADS).imap(fcn, range(n))
pbar = tqdm(enumerate(results), total=n, bar_format=BAR_FORMAT)
pbar = tqdm(enumerate(results), total=n, bar_format=BAR_FORMAT, disable=LOCAL_RANK > 0)
for i, x in pbar:
if cache_images == 'disk':
gb += self.npy_files[i].stat().st_size

Loading…
Cancel
Save