Skip to content
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

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

Alnusjaponica
Copy link
Collaborator

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 the Test(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 given early_stopping_rounds and pass to LightGBM side. Note that early_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).

@github-actions github-actions bot added the optuna.integration Related to the `optuna.integration` submodule. This is automatically labeled by github-actions. label Jun 16, 2023
@github-actions
Copy link
Contributor

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jun 25, 2023
@github-actions github-actions bot removed the stale Exempt from stale bot labeling. label Jun 28, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

This pull request has not seen any recent activity.

@github-actions github-actions bot added the stale Exempt from stale bot labeling. label Jul 5, 2023
@not522 not522 self-assigned this Jul 6, 2023
@github-actions github-actions bot removed the stale Exempt from stale bot labeling. label Jul 6, 2023
@Alnusjaponica Alnusjaponica marked this pull request as ready for review July 13, 2023 05:14
@codecov-commenter
Copy link

Codecov Report

Merging #4752 (4a7057e) into master (88acc1b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ 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     
Impacted Files Coverage Δ
optuna/integration/_lightgbm_tuner/optimize.py 95.88% <100.00%> (+0.04%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@not522 not522 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@not522 not522 added the code-fix Change that does not change the behavior, such as code refactoring. label Jul 13, 2023
@not522 not522 removed their assignment Jul 13, 2023
Copy link
Member

@contramundum53 contramundum53 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@contramundum53 contramundum53 merged commit 84c521d into optuna:master Jul 14, 2023
31 of 56 checks passed
@contramundum53 contramundum53 added this to the v3.3.0 milestone Jul 14, 2023
@Alnusjaponica Alnusjaponica deleted the fix-lightGBM-argument branch August 1, 2023 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-fix Change that does not change the behavior, such as code refactoring. optuna.integration Related to the `optuna.integration` submodule. This is automatically labeled by github-actions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants