Closed RalfG closed 3 years ago
Dislike doing this... Still did set the NUMEXPR_MAX_THREADS. Should not be done system-wide. The way it is added now will cause bugs/problems in the future.
Strange that it did not work in my case... I'd have to look into what happened.
What do you mean, system-wide? Changes with os.environ()
only affect the current process and child-processes (e.g. os.system()
), see https://docs.python.org/3/library/os.html#os.putenv.
DeepLC (tensorflow) does not seem to obey num_jobs, as NUMEXPR_MAX_THREADS env variable is not set.
I would propose to first check if
NUMEXPR_MAX_THREADS
has already been set, and if not, we can set it to thenum_jobs
parameter that was passed to DeepLC.