-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Handle deprecated argument early_stopping_rounds
#4752
Handle deprecated argument early_stopping_rounds
#4752
Conversation
This pull request has not seen any recent activity. |
This pull request has not seen any recent activity. |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #4752 +/- ##
=======================================
Coverage 90.68% 90.69%
=======================================
Files 195 195
Lines 14598 14602 +4
=======================================
+ Hits 13238 13243 +5
+ Misses 1360 1359 -1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM!
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.
LGTM!
Motivation
The argument
early_stopping_rounds
is deprecated in microsoft/LightGBM#4574 and has been already removed in the latest version by microsoft/LightGBM#4908. Our integration uses this argument and currently warned in theTest(integration)
as follows.https://github.com/optuna/optuna/actions/runs/5274281893/jobs/9538592552?pr=4746#step:10:167
This PR resolves the warnings while preserving backward compatibility with
LightGBM<4.0.0
.Description of the changes
Generate a callback
early_stopping()
according to the givenearly_stopping_rounds
and pass toLightGBM
side. Note thatearly_stopping()
is added in the very early stage (microsoft/LightGBM#131) and therefore this change does not break backward compatibility at least with documented version (LightGBM >=v3.2.1
).