`NUM_THREADS` leave at least 1 CPU free (#5706)
Updated strategy leaves at least 1 cpu free to avoid system overloads. Partially addresses https://github.com/ultralytics/yolov5/issues/5685
This commit is contained in:
parent
562191f575
commit
8df64a9122
|
|
@ -35,7 +35,7 @@ HELP_URL = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data'
|
|||
IMG_FORMATS = ['bmp', 'jpg', 'jpeg', 'png', 'tif', 'tiff', 'dng', 'webp', 'mpo'] # acceptable image suffixes
|
||||
VID_FORMATS = ['mov', 'avi', 'mp4', 'mpg', 'mpeg', 'm4v', 'wmv', 'mkv'] # acceptable video suffixes
|
||||
WORLD_SIZE = int(os.getenv('WORLD_SIZE', 1)) # DPP
|
||||
NUM_THREADS = min(8, os.cpu_count()) # number of multiprocessing threads
|
||||
NUM_THREADS = min(8, max(1, os.cpu_count() - 1)) # number of multiprocessing threads
|
||||
|
||||
# Get orientation exif tag
|
||||
for orientation in ExifTags.TAGS.keys():
|
||||
|
|
|
|||
Loading…
Reference in New Issue