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

BUG: n_jobs=None not handled properly anymore in Parallel #1473

Closed
larsoner opened this issue Jun 30, 2023 · 2 comments · Fixed by #1475
Closed

BUG: n_jobs=None not handled properly anymore in Parallel #1473

larsoner opened this issue Jun 30, 2023 · 2 comments · Fixed by #1475

Comments

@larsoner
Copy link
Contributor

At least on my machine and implicitly in MNE-Python tests:

>>> import joblib
>>> with joblib.parallel_config('loky', n_jobs=2):
...     print(joblib.Parallel(n_jobs=None).n_jobs)
... 
1
>>> with joblib.parallel_config('loky', n_jobs=2):
...     print(joblib.Parallel().n_jobs)
... 
2
>>> joblib.__version__
'1.3.1'

No idea why it happens. On my machine it's from PyPI on Linux.

@larsoner
Copy link
Contributor Author

Based on a quick read of the code I think it's due to the _Sentinel business introduced by @tomMoral in #1457

@larsoner
Copy link
Contributor Author

... nope, actually looks like it was introduced by @jeremiedbb in #1392.

In any case, it seems like a regression that n_jobs=None is not treated the way it was before (and the same as the None that is the default).

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

Successfully merging a pull request may close this issue.

2 participants