[MRG+1] Common test refactoring#4550
Conversation
There was a problem hiding this comment.
this is absorbed into the tests above
a13715a to
c4f2488
Compare
There was a problem hiding this comment.
This is ugly, and we could probably change that by raising an error. The orginal traceback is printed anyhow. @GaelVaroquaux thoughts?
There was a problem hiding this comment.
that is old, don't feel like doing it now ;)
|
sent you a PR with nitpicks. besides LGTM ! |
ce5713f to
ac56fbf
Compare
|
travis is not happy :( |
8205e36 to
4952874
Compare
4952874 to
e386698
Compare
|
I need to rebase on #4590 to get consistent behavior for python2 and python3. |
e386698 to
196a7b7
Compare
|
that should do it. that was some annoying testing.... |
|
+1 for merge. thx @amueller ! |
|
thanks @agramfort for the review :) |
|
This looks good to me. We can always improve further but I would rather not delay this refactoring that is already a net benefit. |
[MRG+1] Common test refactoring
|
Thanks @amueller !!! |
|
Great, I will try |
There was a problem hiding this comment.
Why not using is_classifier? (which is based on estimator tags rather than inheritance)
There was a problem hiding this comment.
I commented somewhere: you can inherit from multiple mixins, but only have one tag currently. Maybe that is an issue with the tag system?
I could have used the tags for everything but Transformer, maybe I should have done that. I kind of punted on this one.
There was a problem hiding this comment.
For detecting transformers, I think checking for fit_transform or transform should be pretty reliable. Not sure if we need to add a new is_transformer helper, though.
|
@mblondel yeah it would be sweet if you could try it. And I'm sure it will fail ;) |
|
@ogrisel any improvment you have in mind / anything that is missing? thanks for the merge :) |
|
@amueller And lightning is probably far from compliant, especially w.r.t. to input checking. |

Fixes #3810.
Introduces a public
check_estimatorthat runs all checks.Currently it relies on inheritance to see which tests to run (in addition to the general tests).
It could also rely on the recently introduced tags #4418 but there is currently only a single tag, while something might be a classifier and a transformer....
Todo: