You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that we have a possible regression linked to the nested parallelism. Let's take the following minimum example:
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score
X = np.random.randn(500000, 80)
y = np.random.randint(0, 2, 500000)
clf = RandomForestClassifier(n_jobs=-1)
cross_val_score(clf, X, y, n_jobs=1)
In 0.19.2, htop shows activity for all processors. In 0.20, a single core is active. Is it link to the heuristic to avoid to over-subscription?
I checked with joblib master by enabling the site version and the bug is still there.
It won't fix the bug, but in the meanwhile you can still do
Since this is just for a course on computer with 4 cores, it would be OK to do so. However, people with 48 cores computer will be a bit disappointed :)
Activity
jnothman commentedon Oct 15, 2018
glemaitre commentedon Oct 15, 2018
The opposite actually.
#12289 was due to default setting
n_jobs=-1internally injoblibfrom what I understand in the bugfix.jeremiedbb commentedon Oct 15, 2018
It won't fix the bug, but in the meanwhile you can do that :)
glemaitre commentedon Oct 15, 2018
I checked with
joblibmaster by enabling the site version and the bug is still there.Since this is just for a course on computer with 4 cores, it would be OK to do so. However, people with 48 cores computer will be a bit disappointed :)
tomMoral commentedon Oct 15, 2018
This looks like an issue with
SequentialBackend, which set by defaultSequentialBackendas a nested backend.... (see here).It should actually not set a nested backend when nesting level is
0, as this disable multithreading in this case. Nice catch, this should be fixed.FIX nested backend not changed by SequentialBackend (#792)
tomMoral commentedon Oct 16, 2018
This should be fixed on the
joblibmaster. Can you confirm?glemaitre commentedon Oct 17, 2018
Yep. Everything is fine. Shall we close now or when we release 0.20.1 with the new vendored joblib?
amueller commentedon Oct 17, 2018
we fix if it's closed in sklearn master usually...
ogrisel commentedon Nov 7, 2018
This was fixed by merging joblib 0.13.0. I just checked on master and @glemaitre's code snippet causes all CPUs to be used at 100% as expected.