always set it (#7006)

This commit is contained in:
Eric Liang
2020-02-02 22:48:29 -08:00
committed by GitHub
parent 77436c2e32
commit f939cb39ee
+1 -2
View File
@@ -1,6 +1,5 @@
import os
import logging
import multiprocessing
from os.path import dirname
import sys
@@ -14,7 +13,7 @@ if "pickle5" in sys.modules:
"requires a specific version of pickle5 (which is "
"packaged along with Ray).")
if "OMP_NUM_THREADS" not in os.environ and multiprocessing.cpu_count() > 8:
if "OMP_NUM_THREADS" not in os.environ:
logger.warning("[ray] Forcing OMP_NUM_THREADS=1 to avoid performance "
"degradation with many workers (issue #6998). You can "
"override this by explicitly setting OMP_NUM_THREADS.")