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

Skip to content

[MRG+1] use ignore_warnings to catch FutureWarning raised by SGDClassifier #9374

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
Jul 17, 2017

Conversation

NickleDave
Copy link
Contributor

@NickleDave NickleDave commented Jul 15, 2017

Fixes #9365

uses ignore_warnings to catch FutureWarning raised by SGDClassifier

I did not yet eliminate the same warning raised by PassiveAggressiveClassifier, etc.

@amueller do you know of a way to get nosetests / pytests to output the line numbers from the test files where the warning is raised so I can more easily find the other places that raise this warning? @raghavrv and Jacob tried to help me with that but we couldn't figure it out

@NickleDave NickleDave changed the title use ignore_warning to catch FutueWarning use ignore_warnings to catch FutueWarning Jul 15, 2017
@NickleDave NickleDave changed the title use ignore_warnings to catch FutueWarning use ignore_warnings to catch FutureWarning raised by SGDClassifier Jul 15, 2017
@amueller
Copy link
Member

I don't know of a way

@amueller
Copy link
Member

you can raise warnings as errors, right? Or just change that particular warning into a raise for debugging purposes.

@jnothman
Copy link
Member

jnothman commented Jul 16, 2017 via email

@jnothman
Copy link
Member

jnothman commented Jul 16, 2017 via email

@NickleDave
Copy link
Contributor Author

I ran pytest sklearn/ -W error::FutureWarning and the only place I now get the FutureWarning is is in the doctests for stochastic_gradient. @amueller said to leave them, but if there are others that I'm not catching somehow--didn't see any warnings for PassiveAggressiveClassifier as referenced in the original isue--then I can go back and try to root those out

@TomDLT
Copy link
Member

TomDLT commented Jul 17, 2017

pytest sklearn/ -W error::FutureWarning

I didn't know this command. Nice!


LGTM

@TomDLT TomDLT changed the title use ignore_warnings to catch FutureWarning raised by SGDClassifier [MRG+1] use ignore_warnings to catch FutureWarning raised by SGDClassifier Jul 17, 2017
@jnothman
Copy link
Member

Thanks

@jnothman jnothman merged commit eece6d9 into scikit-learn:master Jul 17, 2017
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Aug 6, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants