-
-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Fix deprecation warnings in tests #5089
Comments
the Also hunting for more is always possible ;) |
to be clear: there should definitely be no "DeprecationWarnings" in the tests, and ideally there would be no warnings. |
To be clearer: we may retain tests that use deprecated behaviour to ensure that deprecated contracts are still maintained for backwards compatibility, but any warnings should be silenced. Otherwise, we shouldn't be using deprecated constructs from our own or imported libraries in any testing or tested code. Sorry, I don't know anything about |
We have deprecated the old default behavior in favour of the new one which is more intuitive (macro r2-score instead of variance weighted macro averaging). Setting manually the new or olds strategy will remove those warnings. |
Those were added since people are supposed to do dimensionality reduction with random projection. There is also nothing wrong to have more projections than dimensions in the original space. |
@jnothman I agree, but I think that most tests that hit deprecated behavior are actually not the ones for the class / function that was deprecated, but in other parts of the code. And they shouldn't be using deprecated behavior. Having tests that the backward-compatibility still works is obviously a good idea. |
@arjoly the problem is that there is no way to manually set the strategy when using the And for the random_projections: It is just a bit odd that the tests seem to be throwing so many warnings. That means either the defaults are not sensible or the tests are odd. If the warnings are expected, they should be caught. If they are not expected, something needs to be fixed. |
Also, I feel it is the responsibility of the person deprecating / changing a behavior to make sure that the tests still do something sensibly and that warnings are caught when they are expected (I'm guilty of not doing this properly for both regressor decision_functions and the svm decision_function it seems). |
It's possible to set the proper keyword in the mixin.
The default is inferred using the JL-lemma which is stated for many dimension and not for a few. |
That would be a backward incompatible change, though.
Is that a sensible default? I would imagine this to be a conservative estimate. Or should we just catch them all in the tests because the tests are not really in the normal range this would be applied to? |
some should be fixed here #5143 |
@amueller As for the DataDimensionalityWarnings, I have suppressed all of them except for one, which I get when I run nosetest -v sklearn/neighbors but not when nosetests -v sklearn/neighbors/tests. Could you help me with that? Thanks. |
There are some QDA and LDA warnings in tests... (Not sure if someone is already working on it...) |
There are? Only at the very beginning for the import, right? I don't think we can get rid of these. |
closing as I think all are fixed. |
There are way too many warnings in the test suite, see https://travis-ci.org/scikit-learn/scikit-learn/jobs/74122431
ovr
explicitly for now.The text was updated successfully, but these errors were encountered: