Fix pylint: do not use bare 'except' (#5025)
* Fix E722, do not use bare 'except' * Remove used codes * Add FileNotFoundError in LoadImagesAndLabels * Remove AssertionError * Ignore LoadImagesAndLabels * Ignore downloads.py * Ignore torch_utils.py * Ignore train.py * Ignore datasets.py * Enable utils/download.py * Fixing exception in thop * Remove unused code * Fixing exception in LoadImagesAndLabels * Fixing exception in exif_size * Fixing exception in parse_model * Ignore exceptions in requests * Revert the exception as suggested * Revert the exception as suggested
This commit is contained in:
1 parent
b0ade48457
commit
1922ddeac0
4 files changed
+7
-7
No files matched your search
@@ -499,7 +499,6 @@ def main(opt, callbacks=Callbacks()):
|
||||
# DDP mode
|
||||
device = select_device(opt.device, batch_size=opt.batch_size)
|
||||
if LOCAL_RANK != -1:
|
||||
from datetime import timedelta
|
||||
assert torch.cuda.device_count() > LOCAL_RANK, 'insufficient CUDA devices for DDP command'
|
||||
assert opt.batch_size % WORLD_SIZE == 0, '--batch-size must be multiple of CUDA device count'
|
||||
assert not opt.image_weights, '--image-weights argument is not compatible with DDP training'
|
||||
|
||||
Reference in new issue
Block a user