8000 increase verbosity threshold for cross validation by AlJohri · Pull Request #13091 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

increase verbosity threshold for cross validation #13091

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

Closed
wants to merge 1 commit into from
Closed

increase verbosity threshold for cross validation #13091

wants to merge 1 commit into from

Conversation

AlJohri
Copy link
@AlJohri AlJohri commented Feb 4, 2019

Reference Issues/PRs

Fixes #12958

What does this implement/fix? Explain your changes.

Increase the verbosity threshold of cross validation from > 1 to > 2.

Currently verbosity level 1 prints:

[Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=-1)]: Done  30 out of  30 | elapsed: 46.5min finished

and verbosity level 2 prints:

[Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=-1)]: Done   1 out of  10 | elapsed:   40.9s remaining:  2.7min
[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=8.022557928125194e-06 ..........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=8.022557928125194e-06 ..........................
[Parallel(n_jobs=-1)]: Done   2 out of  10 | elapsed:   40.9s remaining:  2.7min
...
[Parallel(n_jobs=-1)]: Done  30 out of  30 | elapsed: 46.5min finished

After this change, verbosity level 2 will only print each joblib iteration:

[Parallel
8000
(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=-1)]: Done   1 out of  10 | elapsed:   40.9s remaining:  2.7min
[Parallel(n_jobs=-1)]: Done   2 out of  10 | elapsed:   40.9s remaining:  2.7min
....
[Parallel(n_jobs=-1)]: Done  30 out of  30 | elapsed: 46.5min finished

Goal: I want to see when each iteration completes but don't want to liter the logs with all the intermediate alphas. This change will allow me to now do that at verbosity level 2.

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.

I would add a .. versionchanged note under verbose : in places this is used. Also needs an entry in doc/whats_new/v0.21.rst. And we should consider whether it needs a test, e.g. to check that you get more lines of output for 2 than 1.

@amueller
Copy link
Member
amueller commented Aug 6, 2019

@AlJohri do you want to make the required changes? Otherwise I'd suggest we close issue and PR as doing this coherently actually requires quite a bit of work.

@amueller
Copy link
Member

closing as no reply.

@amueller amueller closed this Sep 26, 2019
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.

[feature request] change verbosity level of _fit_and_score method
3 participants
0