-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[RFC][python] deprecate advanced args of train()
and cv()
functions and sklearn wrapper
#4574
Conversation
92ef478
to
ad7c60d
Compare
ad7c60d
to
9672372
Compare
train()
and cv()
functions and sklearn wrappertrain()
and cv()
functions and sklearn wrapper
I'm supportive of this idea, but could we preserve the current behavior where Having those now be 0 is a breaking change and I think we should only make that breaking change in 4.0.0. There could be user code out there that is using |
@@ -50,19 +50,27 @@ def _format_eval_result(value: list, show_stdv: bool = True) -> str: | |||
|
|||
|
|||
def print_evaluation(period: int = 1, show_stdv: bool = True) -> Callable: |
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.
maybe we could rename this to log_evaluation
as well? Seems like it is only used in engine
right now so it could be a good time before it is used explicitly as a callback.
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.
Good idea, I like it! Unfortunately, print_evaluation()
callback is already in public API, so we cannot simply rename it.
https://lightgbm.readthedocs.io/en/latest/Python-API.html#callbacks
I'll prepare a separate PR for that if you don't mind.
Sure, will revert some lines of code. |
5956179
to
a25f829
Compare
a25f829
to
07046ec
Compare
Addressed in 07046ec.
in Also, fixed a bug when I can extract bug fixes into separate PRs to make this one easier to review if needed. |
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 can extract bug fixes into separate PRs to make this one easier to review if needed.
I can see where the bug fixes are and understand them, think it's ok to leave them in this PR. Thanks very much for those!
This looks great to me, I have no other comments. Sorry it took a few days to come review this.
Really looking forward to the point in the future where we come back and remove all these deprecation warnings and backwards-compatibility things in the Python and R packages 😀
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Proposing this PR to include in #4310
Encourage users to use callbacks. With removed in
4.0.0
release advanced arguments codebase will become a little bit clearer, confusing cases when both callback and corresponding advanced argument are used will be eliminated, there will be no need to expose new callbacks or new arguments of existing callbacks (#2526) via new arguments of high-level functions/classes making signature of functions incredibly difficult to understand especially for newcomers.