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
DOC fix typos in estimator_checks.py #18599
DOC fix typos in estimator_checks.py #18599
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.
thanks @lorentzenchr
@@ -521,7 +521,7 @@ def check_estimator(Estimator, generate_only=False, strict_mode=True): | |||
|
|||
Parameters | |||
---------- | |||
estimator : estimator object |
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.
actually it will not be possible to pass a class from 0.24, see L560 so I am not sure that we want to change this because I believe that we will change the Estimator
parameter to estimator
.
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.
This is slightly annoying because indeed we switched from classes to instances, and we didn't want to deprecate Estimator
for estimator
.
Documenting estimator
instead of Estimator
clarifies that we expect an instance, but indeed the documented name is inconsistent with the actual parameter name. I'm not sure which is best here.
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.
What about changing to
@_deprecate_positional_args
def check_estimator(estimator=None, *, generate_only=False, strict_mode=True, Estimator=None):
and also throwing a deprecation warning if Estimator=something
was set?
Just an idea how to get it right in the future.
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.
That would be deprecating Estimator
(regardless of the use of _deprecate_positional_args
), which we wanted to avoid / deemed not worth it.
We can deprecate if you think it's cleaner (another PR though). I doubt anyone actually uses check_estimator(Estimator=...)
anyway, so hopefully this shouldn't be a problem for any third party library
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.
Thanks @lorentzenchr
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 the time being this update is needed to keep the docstring consistent with the actual argument.
LGTM
check_estimator
has argumentEstimator
, but documented is a parameterestimator
.