10000 BUG: remove n_jobs=-1 from examples · deepatdotnet/scikit-learn@42c2ce4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42c2ce4

Browse files
GaelVaroquauxFabian Pedregosa
authored and
Fabian Pedregosa
committed
BUG: remove n_jobs=-1 from examples
1 parent 7a6af66 commit 42c2ce4

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

examples/ensemble/plot_forest_importances_faces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from sklearn.ensemble import ExtraTreesClassifier
2020

2121
# Number of cores to use to perform parallel fitting of the forest model
22-
n_jobs = 2
22+
n_jobs = 1
2323

2424
# Loading the digits dataset
2525
data = fetch_olivetti_faces()

examples/exercises/plot_cv_diabetes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
for alpha in alphas:
2828
lasso.alpha = alpha
29-
this_scores = cross_validation.cross_val_score(lasso, X, y, n_jobs=-1)
29+
this_scores = cross_validation.cross_val_score(lasso, X, y, n_jobs=1)
3030
scores.append(np.mean(this_scores))
3131
scores_std.append(np.std(this_scores))
3232

examples/exercises/plot_cv_digits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
scores_std = list()
2424
for C in C_s:
2525
svc.C = C
26-
this_scores = cross_validation.cross_val_score(svc, X, y, n_jobs=-1)
26+
this_scores = cross_validation.cross_val_score(svc, X, y, n_jobs=1)
2727
scores.append(np.mean(this_scores))
2828
scores_std.append(np.std(this_scores))
2929

examples/plot_digits_pipe.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949

5050
###############################################################################
5151
# Prediction
52-
scores = cross_validation.cross_val_score(pipe, X_digits, y_digits, n_jobs=-1)
5352

5453
from sklearn.grid_search import GridSearchCV
5554

0 commit comments

Comments
 (0)
0