-
-
Notifications
You must be signed in to change notification settings - Fork 26k
MAINT Do not propagate n_jobs as n_threads #22593
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
MAINT Do not propagate n_jobs as n_threads #22593
Conversation
`n_jobs` is to be used for joblib tasks but not for the number of threads to use for OpenMP.
It is not needed (yet), hence let's just remove it.
Co-authored-by: Olivier Grisel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on not passing n_threads=self.n_jobs
.
This reverts commit fb19915. Co-authored-by: Jérémie du Boisberranger <[email protected]>
Co-authored-by: Thomas J. Fan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the other parts of the codebase we usually call _openmp_effective_n_threads
and pass it into Cython code through n_threads
. In this case, the Cython code is calling _openmp_effective_n_threads
itself. In the end, it's the same.
For this PR, I'm okay with removing n_threads
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well.
Before merging there is problem with a new warning raised in the sphinx doc. |
Catching up with scikit-learn#22593. Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]> Co-authored-by: Jérémie du Boisberranger <[email protected]> Co-authored-by: Thomas J. Fan <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]> Co-authored-by: Jérémie du Boisberranger <[email protected]> Co-authored-by: Thomas J. Fan <[email protected]>
Reference Issues/PRs
Follow-up for #22134.
What does this implement/fix? Explain your changes.
n_jobs
is to be used for joblib tasks but not for the number of threads to use for OpenMP.Any other comments?
As per our discussion, @ogrisel.