-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
ENH Smoke test for invalid parameters in __init__ and get_params #21355
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
ENH Smoke test for invalid parameters in __init__ and get_params #21355
Conversation
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.
Besides the comment below, the test it-self looks like a good idea.
I am not sure that Pipeline
and FeatureUnion
or other complex meta-estimators will all ever pass this test though, but for "regular" estimators, I think it's a good idea not to validate in __init__
or set_params
in general.
I would not make it a check_estimator
requirement though.
I assume that we need to open a subsequent issue to reduce the list of the estimator validating parameters in the wrong place. |
Somehow I thought I added that test before but I guess I just complained loudly three years ago in #12652. lol... |
…at setter, keep at getter
Reference Issues/PRs
Related to #16945
What does this implement/fix? Explain your changes.
This PR adds a new test that checks that no validation is done during
__init__
andset_params
. I fixed the on in_BaseComposition
because it is inherited by many estimators.Any other comments?
Maybe this can be a good intermediate sprint issue?