-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Deprecate any import that is not from sklearn.neural_network #14913
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
NicolasHug
wants to merge
11
commits into
scikit-learn:master
from
NicolasHug:underscore_files_neural_network
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
838ee72
renamed files with leading underscore
NicolasHug d005f90
comments and pep8
NicolasHug a9895f9
again
NicolasHug c850d8e
without conflicts this time
NicolasHug b4360c3
Merge branch 'lol' into underscore_files_neural_network
NicolasHug 970f65c
remove extra line break
NicolasHug a4ca778
update message
NicolasHug 8bc7660
change warning msg
NicolasHug 6286843
synteax error
NicolasHug fc86b67
better comment
NicolasHug 97a8841
[doc build]
NicolasHug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
does this also result in the doctests not to run?
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.
Yes, maybe rather not raise the warning in a pytest session?
Something like ,
in the affected files, where
sys._is_pytest_session
is already set inconftest.py
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.
There is no docstring in
rbm.py
. There's almost no code in these files now, all they do is raises a warning.@rth I have no strong opinion but I think that we should rather have pytest ignore a file, rather than have a file have specific behavior for pytest. LMK.
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.
For now. Hard to to know some time later that this file is ignored by pytest just by looking at it (or to remove that line once the file is removed). I think if we can do deprecations locally without touching global config files it is better.
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 don't see the file evolving, ever? This is the file we just created.
We only need to ignore the file because we run the tests with
-Werror::DeprecationWarning
. Not raising the warning when we are in a pytest session is treating the issue in the reverse order IMO, but OK. I'll address it in #14939 if you don't mindThere 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.
Me neither, but who knows. Accidents and messed up merge conflicts do happen.
Yes, I agree it's not ideal, but both this and changing the
conftest.py
is a way around our non standard use of error on warning. Not sure if there is a better solution.