unstale

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 init

@unstale/cli 0.2.9 on npm

lightgbm 468 changes

Breaking changes 28

  • The Arrow-related C API removes an incorrect const modifier, affecting the API signature.

    4.7.0release notes

  • Most builds now default to C++17.

    4.7.0release notes

  • CUDA builds now default to C++17.

    4.7.0release notes

  • The Python package drops support for h2o datatable inputs.

    4.7.0release notes

  • The minimum supported Python version is now 3.10.

    4.7.0release notes

  • Using the regression_l1 objective with linear trees is prohibited.

    4.7.0release notes

  • Booster.attr() was removed.

    4.0.0release notes

  • The Booster handle attribute was made private.

    4.0.0release notes

  • The is_reshape argument was removed from Booster.predict.

    4.0.0release notes

  • Booster.set_attr() was removed.

    4.0.0release notes

  • The early_stopping_rounds argument was removed from cv(); use the early-stopping callback instead.

    4.0.0release notes

  • The verbose_eval argument was removed from cv().

    4.0.0release notes

  • The R package removed support for passing parameters through ... in lgb.Dataset().

    4.0.0release notes

  • Dataset.feature_penalty was removed from the Python package.

    4.0.0release notes

  • The Dataset handle attribute was made private.

    4.0.0release notes

  • The Python package removed fobj in favor of passing a custom objective function in params.

    4.0.0release notes

  • The R package removed lgb.unloader().

    4.0.0release notes

  • Support for macOS Mojave (10.14) was dropped.

    4.0.0release notes

  • Installation using pip's --install-option is no longer supported.

    4.0.0release notes

  • The R predict interface renames data to newdata and uses type to select prediction types.

    4.0.0release notes

  • The project dropped its support promise for Python 3.6, although installation may still technically work.

    4.0.0release notes

  • The Python package enforces a minimum Python version of 3.6.

    4.0.0release notes

  • The Python package removed setup.py and switched to PEP 517 / 518 builds.

    4.0.0release notes

  • Support for Solaris was dropped.

    4.0.0release notes

  • The early_stopping_rounds argument was removed from train(); use the early-stopping callback instead.

    4.0.0release notes

  • The evals_result argument was removed from train().

    4.0.0release notes

  • The learning_rates argument was removed from train().

    4.0.0release notes

  • The verbose_eval argument was removed from train().

    4.0.0release notes

Deprecations 1

  • The eval_set parameter in scikit-learn fit() methods is deprecated in favor of eval_X and eval_y.

    4.7.0release notes

New APIs and options 22

  • A CUDA version of the binary error metric is available.

    4.7.0release notes

  • CUDA builds add multi-GPU support for training with NVIDIA GPUs.

    4.7.0release notes

  • CUDA 13 is supported; users can supply a CUDA architecture list, and the default GPU architectures have been updated.

    4.7.0release notes

  • Evaluation result attributes can be accessed by name.

    4.7.0release notes

  • LGBMClassifier adds decision_function().

    4.7.0release notes

  • Parameters can now be loaded from a model string.

    4.7.0release notes

  • The Python package accepts Polars Series as input, including as positional data, through Arrow interoperability.

    4.7.0release notes

  • A CPU version of the standard R-squared metric is available.

    4.7.0release notes

  • LightGBM adds support for ROCm/HIP devices, including ROCm builds.

    4.7.0release notes

  • Scikit-learn fit() methods add eval_X and eval_y parameters for validation data; eval_set is deprecated.

    4.7.0release notes

  • Adds validate_features to refit.

    4.0.0release notes

  • Adds a method for setting a leaf output on a Booster.

    4.0.0release notes

  • Dask training supports custom objective functions.

    4.0.0release notes

  • CVBooster models can be saved and loaded.

    4.0.0release notes

  • The manylinux_2_28 Linux wheels support GPU automatically; pass device="gpu" to use the OpenCL-based GPU build.

    4.0.0release notes

  • The C API, Python package, and R package expose the number of bins for features.

    4.0.0release notes

  • Adds a configurable threshold for how much evaluation metrics must improve to count as improved for early stopping.

    4.0.0release notes

  • Adds eval_train_metric to lgb.cv().

    4.0.0release notes

  • The R lightgbm() interface promotes objective and init_score to top-level arguments.

    4.0.0release notes

  • Adds the fitted n_iter_ attribute to the scikit-learn API.

    4.0.0release notes

  • Adds nrounds as an alias for num_iterations.

    4.0.0release notes

  • Quantized training is available on CPU and can greatly improve training speeds.

    4.0.0release notes

Behavior and default changes 11

  • PyArrow Tables are supported as inputs to scikit-learn methods.

    4.7.0release notes

  • Imports of dask, graphviz, joblib, matplotlib, and psutil are lazy, changing when those dependencies are imported.

    4.7.0release notes

  • Alias warnings are suppressed when verbosity is less than zero.

    4.0.0release notes

  • Label checks are no longer performed when loading a dataset from a binary file because labels are ignored in that case.

    4.0.0release notes

  • Loading a dataset from a binary file now emits additional warnings.

    4.0.0release notes

  • Boosting types are decoupled.

    4.0.0release notes

  • All callbacks are now pickleable, improving interoperability with tools such as Ray and Dask.

    4.0.0release notes

  • Warnings are logged for the number of bins of categorical features.

    4.0.0release notes

  • The R lightgbm() interface promotes the thread count to a top-level argument and defaults it to the number of cores.

    4.0.0release notes

  • The Python package supports pandas nullable types.

    4.0.0release notes

  • The Python package no longer requires scikit-learn as a hard dependency.

    4.0.0release notes

Tooling 2

  • LightGBM supports building with C++17.

    4.0.0release notes

  • The Python package exports inline type hints with py.typed for code using LightGBM.

    4.0.0release notes

Fixes and other changes 4

  • Dataset.set_position() now updates self.position.

    4.7.0release notes

  • Percentile calculation is fixed for weighted training with regression objectives, including mape, quantile, and regression_l1.

    4.7.0release notes

  • Adds the fitted n_estimators_ attribute to the scikit-learn API.

    4.0.0release notes

  • Warning wording was improved, changing the messages developers may see.

    4.0.0release notes

lightgbm 329 changes

Breaking changes 2

Deprecations 2

New APIs and options 16

  • auc-mu is available as a metric.

    3.0.0release notes

  • Extremely randomized trees are available.

    3.0.0release notes

  • Saved model files include feature importance information.

    3.0.0release notes

  • The Python scikit-learn API exposes feature_name_.

    3.0.0release notes

  • Interaction constraints are available, including an interface in the R package.

    3.0.0release notes

  • Models expose a way to get possible maximum and minimum values.

    3.0.0release notes

  • The scikit-learn interface exposes an attribute for the number of features used.

    3.0.0release notes

  • The Python interface can output a model to a pandas DataFrame.

    3.0.0release notes

  • Path smoothing is available as a new feature.

    3.0.0release notes

  • An option can disable shape checking during prediction.

    3.0.0release notes

  • Logs can be redirected to the Python console.

    3.0.0release notes

  • The Python cv function accepts return_cvbooster, allowing callers to request a CVBooster.

    3.0.0release notes

  • The Python predict interface accepts start_iteration.

    3.0.0release notes

  • A static library build option is available.

    3.0.0release notes

  • The Python interface allows callers to specify a tree's orientation.

    3.0.0release notes

  • XE_NDCG_MART is implemented for ranking tasks.

    3.0.0release notes

Performance 3

  • Monotone constraints have an improved fast method and support splits penalization.

    3.0.0release notes

  • Both row-wise and col-wise multi-threading are supported.

    3.0.0release notes

  • Single prediction is optimized.

    3.0.0release notes

Behavior and default changes 3

Fixes and other changes 3

  • The Python scikit-learn fit() interface passes init_model to train().

    3.0.0release notes

  • The scikit-learn API handles RandomState objects.

    3.0.0release notes

  • Feature names support UTF-8 characters again.

    3.0.0release notes