-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+1] DOC: updating GridSearchCV's n_jobs parameter #8106
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
Conversation
|
||
n_jobs: int, default: 1 : | ||
The maximum number of concurrently running jobs, such as the number of | ||
Python worker processes when backend=”multiprocessing” or the size of |
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.
The user cannot really choose the backend here so this is too much information, I think.
Perhaps copy an n_jobs description from elsewhere in scikit-learn, rather than from joblib.parallel.
Also, please replicate your changes to RandomizedSearchCV
.
ec0111c
to
54bf333
Compare
@jnothman thanks for the feedback, I made the necessary changes. Let me know if anything else needs to be fixed. |
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.
Otherwise LGTM
n_jobs : int, default=1 | ||
Number of jobs to run in parallel. | ||
n_jobs: int, default: 1 : | ||
The maximum number of concurrently running jobs. |
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.
Could be more explicit, "estimators fit in parallel"
54bf333
to
5131d3c
Compare
Wait: doesn't this still need to be applied to RandomizedSearchCV? |
@jnothman it was added to |
Sorry for my slowness. LGTM |
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.
Some nipticks otherwise LGTM.
|
||
- For n_jobs below -1, (n_cpus + 1 + n_jobs) are used. | ||
|
||
- For n_jobs = -2, all CPUs but one are used. |
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.
I think it's better to merge the last two points. Maybe something like :
For ``n_jobs`` below -1, ``(n_cpus + n_jobs + 1)`` are used. For example, with ``n_jobs = -2`` all CPUs but one are used.
What do you think ?
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.
sounds good
eca4339
to
c2e48e0
Compare
c2e48e0
to
88c63d5
Compare
thanks for the review @tguillemot , I made the change but not sure why one of the appveyor tests is failing now.... |
Clearly not your fault. Merging, thanks! |
Thx @accraze. |
Reference Issue
Fixes #5797
What does this implement/fix? Explain your changes.
Clarify n_jobs for gridsearch in docs
Any other comments?