pypi / lightgbm
lightgbm
What changed in lightgbm 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-28.
30 breaking3 deprecations38 new APIs and options3 performance14 behavior and defaults2 tooling7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initlightgbm 468 changes
Breaking changes 28
The Arrow-related C API removes an incorrect const modifier, affecting the API signature.
Most builds now default to C++17.
CUDA builds now default to C++17.
The Python package drops support for h2o datatable inputs.
The minimum supported Python version is now 3.10.
Using the regression_l1 objective with linear trees is prohibited.
Booster.attr() was removed.
The Booster handle attribute was made private.
The is_reshape argument was removed from Booster.predict.
Booster.set_attr() was removed.
The early_stopping_rounds argument was removed from cv(); use the early-stopping callback instead.
The verbose_eval argument was removed from cv().
The R package removed support for passing parameters through ... in lgb.Dataset().
Dataset.feature_penalty was removed from the Python package.
The Dataset handle attribute was made private.
The Python package removed fobj in favor of passing a custom objective function in params.
The R package removed lgb.unloader().
Support for macOS Mojave (10.14) was dropped.
Installation using pip's --install-option is no longer supported.
The R predict interface renames data to newdata and uses type to select prediction types.
The project dropped its support promise for Python 3.6, although installation may still technically work.
The Python package enforces a minimum Python version of 3.6.
The Python package removed setup.py and switched to PEP 517 / 518 builds.
Support for Solaris was dropped.
The early_stopping_rounds argument was removed from train(); use the early-stopping callback instead.
The evals_result argument was removed from train().
The learning_rates argument was removed from train().
The verbose_eval argument was removed from train().
Deprecations 1
The eval_set parameter in scikit-learn fit() methods is deprecated in favor of eval_X and eval_y.
New APIs and options 22
A CUDA version of the binary error metric is available.
CUDA builds add multi-GPU support for training with NVIDIA GPUs.
CUDA 13 is supported; users can supply a CUDA architecture list, and the default GPU architectures have been updated.
Evaluation result attributes can be accessed by name.
LGBMClassifier adds decision_function().
Parameters can now be loaded from a model string.
The Python package accepts Polars Series as input, including as positional data, through Arrow interoperability.
A CPU version of the standard R-squared metric is available.
LightGBM adds support for ROCm/HIP devices, including ROCm builds.
Scikit-learn fit() methods add eval_X and eval_y parameters for validation data; eval_set is deprecated.
Adds validate_features to refit.
Adds a method for setting a leaf output on a Booster.
Dask training supports custom objective functions.
CVBooster models can be saved and loaded.
The manylinux_2_28 Linux wheels support GPU automatically; pass device="gpu" to use the OpenCL-based GPU build.
The C API, Python package, and R package expose the number of bins for features.
Adds a configurable threshold for how much evaluation metrics must improve to count as improved for early stopping.
Adds eval_train_metric to lgb.cv().
The R lightgbm() interface promotes objective and init_score to top-level arguments.
Adds the fitted n_iter_ attribute to the scikit-learn API.
Adds nrounds as an alias for num_iterations.
Quantized training is available on CPU and can greatly improve training speeds.
Behavior and default changes 11
PyArrow Tables are supported as inputs to scikit-learn methods.
Imports of dask, graphviz, joblib, matplotlib, and psutil are lazy, changing when those dependencies are imported.
Alias warnings are suppressed when verbosity is less than zero.
Label checks are no longer performed when loading a dataset from a binary file because labels are ignored in that case.
Loading a dataset from a binary file now emits additional warnings.
Boosting types are decoupled.
All callbacks are now pickleable, improving interoperability with tools such as Ray and Dask.
Warnings are logged for the number of bins of categorical features.
The R lightgbm() interface promotes the thread count to a top-level argument and defaults it to the number of cores.
The Python package supports pandas nullable types.
The Python package no longer requires scikit-learn as a hard dependency.
Tooling 2
LightGBM supports building with C++17.
The Python package exports inline type hints with py.typed for code using LightGBM.
Fixes and other changes 4
Dataset.set_position() now updates self.position.
Percentile calculation is fixed for weighted training with regression objectives, including mape, quantile, and regression_l1.
Adds the fitted n_estimators_ attribute to the scikit-learn API.
Warning wording was improved, changing the messages developers may see.
lightgbm 329 changes
Breaking changes 2
The init-score parameter was removed.
The R package requires R 3.5 or newer.
Deprecations 2
lgb.prepare() is deprecated.
lgb.prepare2() is deprecated.
New APIs and options 16
auc-mu is available as a metric.
Extremely randomized trees are available.
Saved model files include feature importance information.
The Python scikit-learn API exposes feature_name_.
Interaction constraints are available, including an interface in the R package.
Models expose a way to get possible maximum and minimum values.
The scikit-learn interface exposes an attribute for the number of features used.
The Python interface can output a model to a pandas DataFrame.
Path smoothing is available as a new feature.
An option can disable shape checking during prediction.
Logs can be redirected to the Python console.
The Python cv function accepts return_cvbooster, allowing callers to request a CVBooster.
The Python predict interface accepts start_iteration.
A static library build option is available.
The Python interface allows callers to specify a tree's orientation.
XE_NDCG_MART is implemented for ranking tasks.
Performance 3
Monotone constraints have an improved fast method and support splits penalization.
Both row-wise and col-wise multi-threading are supported.
Single prediction is optimized.
Behavior and default changes 3
Bagging is decoupled from num_threads.
JSON dumps include feature information and feature importance.
TreeSHAP supports sparse data.
Fixes and other changes 3
The Python scikit-learn fit() interface passes init_model to train().
The scikit-learn API handles RandomState objects.
Feature names support UTF-8 characters again.