fix: upgrade deprecated LightGBM API in docs and version constraints#2145
Open
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Open
fix: upgrade deprecated LightGBM API in docs and version constraints#2145Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…aints The core model code (gbdt.py, highfreq_gdbt_model.py, double_ensemble.py) was already updated to use LightGBM's callback-based API in PR microsoft#974, but the documentation and version constraints were not updated to match: - Update docs/start/integration.rst to use lgb.early_stopping(), lgb.log_evaluation(), and lgb.record_evaluation() callbacks instead of the deprecated early_stopping_rounds, verbose_eval, and evals_result parameters (removed in LightGBM 4.0) - Set minimum lightgbm>=3.3.0 in pyproject.toml (callback API introduced in 3.3.0) - Update example requirements.txt files from lightgbm==3.1.0 to lightgbm>=3.3.0 to match the callback API usage in the codebase Closes microsoft#904 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/start/integration.rst) to use LightGBM's modern callback-based API instead of deprecated parameterslightgbm>=3.3.0inpyproject.toml(callback API was introduced in 3.3.0)requirements.txtfiles fromlightgbm==3.1.0tolightgbm>=3.3.0Problem
The core model code was already fixed in PR #974 to use callbacks (
lgb.early_stopping(),lgb.log_evaluation(),lgb.record_evaluation()), but:early_stopping_rounds,verbose_eval,evals_resultpassed directly tolgb.train()), which was removed in LightGBM 4.0pyproject.tomlhad no lower bound, allowing installation of LightGBM versions that don't support the callback APIlightgbm==3.1.0, which predates the callback API (introduced in 3.3.0)Changes
docs/start/integration.rstlgb.train()parameters with callback equivalentspyproject.toml"lightgbm"→"lightgbm>=3.3.0"examples/benchmarks/DoubleEnsemble/requirements.txtlightgbm==3.1.0→lightgbm>=3.3.0examples/hyperparameter/LightGBM/requirements.txtlightgbm==3.1.0→lightgbm>=3.3.0Test plan
gbdt.py,highfreq_gdbt_model.py,double_ensemble.py) already use callback API correctlyqlib/contrib/model/gbdt.pyCloses #904
🤖 Generated with Claude Code