Respect ENV value for OMP_NUM_THREADS if set (#16751)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
67683a87f1
commit
1e6c454460
1 changed files with 3 additions and 2 deletions
|
|
@ -4,8 +4,9 @@ __version__ = "8.3.7"
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# Set ENV Variables (place before imports)
|
# Set ENV variables (place before imports)
|
||||||
os.environ["OMP_NUM_THREADS"] = "1" # reduce CPU utilization during training
|
if not os.environ.get("OMP_NUM_THREADS"):
|
||||||
|
os.environ["OMP_NUM_THREADS"] = "1" # default for reduced CPU utilization during training
|
||||||
|
|
||||||
from ultralytics.data.explorer.explorer import Explorer
|
from ultralytics.data.explorer.explorer import Explorer
|
||||||
from ultralytics.models import NAS, RTDETR, SAM, YOLO, FastSAM, YOLOWorld
|
from ultralytics.models import NAS, RTDETR, SAM, YOLO, FastSAM, YOLOWorld
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue