Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepLC (tensorflow) does not seem to obey num_jobs #19

Closed
RalfG opened this issue Feb 8, 2021 · 2 comments
Closed

DeepLC (tensorflow) does not seem to obey num_jobs #19

RalfG opened this issue Feb 8, 2021 · 2 comments

Comments

@RalfG
Copy link
Member

RalfG commented Feb 8, 2021

DeepLC (tensorflow) does not seem to obey num_jobs, as NUMEXPR_MAX_THREADS env variable is not set.

2021-02-05 08:57:40 // INFO // numexpr.utils // Note: NumExpr detected 32 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
2021-02-05 08:57:40 // INFO // numexpr.utils // NumExpr defaulting to 8 threads.

I would propose to first check if NUMEXPR_MAX_THREADS has already been set, and if not, we can set it to the num_jobs parameter that was passed to DeepLC.

@RobbinBouwmeester
Copy link
Member

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.

#DeepLC@a69e996

@RalfG
Copy link
Member Author

RalfG commented Mar 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants