Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

accraze
Copy link
Contributor

@accraze accraze commented Dec 23, 2016

Reference Issue

Fixes #5797

What does this implement/fix? Explain your changes.

Clarify n_jobs for gridsearch in docs

Any other comments?


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
Copy link
Member

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.

@raghavrv raghavrv changed the title DOC: updating GridSearchCV's n_jobs parameter [WIP] DOC: updating GridSearchCV's n_jobs parameter Dec 28, 2016
@raghavrv raghavrv added this to the 0.19 milestone Dec 28, 2016
@accraze accraze force-pushed the gridsearch-docs branch 2 times, most recently from ec0111c to 54bf333 Compare January 1, 2017 23:06
@accraze
Copy link
Contributor Author

accraze commented Jan 1, 2017

@jnothman thanks for the feedback, I made the necessary changes. Let me know if anything else needs to be fixed.

Copy link
Member

@jnothman jnothman left a 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.
Copy link
Member

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"

@jnothman
Copy link
Member

jnothman commented Jan 2, 2017

Wait: doesn't this still need to be applied to RandomizedSearchCV?

@accraze
Copy link
Contributor Author

accraze commented Jan 3, 2017

@jnothman
Copy link
Member

jnothman commented Jan 3, 2017

Sorry for my slowness. LGTM

@jnothman jnothman changed the title [WIP] DOC: updating GridSearchCV's n_jobs parameter [MRG+1] DOC: updating GridSearchCV's n_jobs parameter Jan 3, 2017
Copy link
Contributor

@tguillemot tguillemot left a 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.
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

@accraze accraze force-pushed the gridsearch-docs branch 2 times, most recently from eca4339 to c2e48e0 Compare January 4, 2017 04:34
@accraze
Copy link
Contributor Author

accraze commented Jan 4, 2017

thanks for the review @tguillemot , I made the change but not sure why one of the appveyor tests is failing now....

@jnothman
Copy link
Member

jnothman commented Jan 4, 2017

Clearly not your fault. Merging, thanks!

@jnothman jnothman merged commit c49ced9 into scikit-learn:master Jan 4, 2017
@tguillemot
Copy link
Contributor

Thx @accraze.

raghavrv pushed a commit to raghavrv/scikit-learn that referenced this pull request Jan 5, 2017
sergeyf pushed a commit to sergeyf/scikit-learn that referenced this pull request Feb 28, 2017
@Przemo10 Przemo10 mentioned this pull request Mar 17, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify n_jobs for gridsearch in docs
4 participants