Skip to content

Commit 20380f7

Browse files
authored
Merge branch 'master' into ci/swig
2 parents bc08bfa + 2f60e11 commit 20380f7

18 files changed

+98
-41
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 4.4.0.99.{build}
1+
version: 4.5.0.99.{build}
22

33
image: Visual Studio 2015
44
platform: x64

.ci/test_r_package_windows.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ if ($env:COMPILER -ne "MSVC") {
195195
}
196196

197197
} else {
198-
$env:TMPDIR = $env:USERPROFILE # to avoid warnings about incremental builds inside a temp directory
199198
$INSTALL_LOG_FILE_NAME = "$env:BUILD_SOURCESDIRECTORY\00install_out.txt"
200199
Run-R-Code-Redirect-Stderr "source('build_r.R')" 1> $INSTALL_LOG_FILE_NAME ; $install_succeeded = $?
201200
Write-Output "----- build and install logs -----"

.ci/test_windows.ps1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ function Check-Output {
88

99
$env:CONDA_ENV = "test-env"
1010
$env:LGB_VER = (Get-Content $env:BUILD_SOURCESDIRECTORY\VERSION.txt).trim()
11+
# Use custom temp directory to avoid
12+
# > warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory
13+
# > as it could lead to issues with incremental build.
14+
# And make sure this directory is always clean
15+
$env:TMPDIR = "$env:USERPROFILE\tmp"
16+
Remove-Item $env:TMPDIR -Force -Recurse -ErrorAction Ignore
17+
[Void][System.IO.Directory]::CreateDirectory($env:TMPDIR)
1118

1219
if ($env:TASK -eq "r-package") {
1320
& .\.ci\test_r_package_windows.ps1 ; Check-Output $?

R-package/DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ Imports:
6363
utils
6464
SystemRequirements:
6565
~~CXXSTD~~
66-
RoxygenNote: 7.3.1
66+
RoxygenNote: 7.3.2

R-package/R/lgb.Dataset.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,13 @@ Dataset <- R6::R6Class(
758758
)
759759

760760
#' @title Construct \code{lgb.Dataset} object
761-
#' @description Construct \code{lgb.Dataset} object from dense matrix, sparse matrix
762-
#' or local file (that was created previously by saving an \code{lgb.Dataset}).
761+
#' @description LightGBM does not train on raw data.
762+
#' It discretizes continuous features into histogram bins, tries to
763+
#' combine categorical features, and automatically handles missing and
764+
# infinite values.
765+
#'
766+
#' The \code{Dataset} class handles that preprocessing, and holds that
767+
#' alternative representation of the input data.
763768
#' @inheritParams lgb_shared_dataset_params
764769
#' @param data a \code{matrix} object, a \code{dgCMatrix} object,
765770
#' a character representing a path to a text file (CSV, TSV, or LibSVM),

R-package/configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for lightgbm 4.4.0.99.
3+
# Generated by GNU Autoconf 2.71 for lightgbm 4.5.0.99.
44
#
55
#
66
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -607,8 +607,8 @@ MAKEFLAGS=
607607
# Identity of this package.
608608
PACKAGE_NAME='lightgbm'
609609
PACKAGE_TARNAME='lightgbm'
610-
PACKAGE_VERSION='4.4.0.99'
611-
PACKAGE_STRING='lightgbm 4.4.0.99'
610+
PACKAGE_VERSION='4.5.0.99'
611+
PACKAGE_STRING='lightgbm 4.5.0.99'
612612
PACKAGE_BUGREPORT=''
613613
PACKAGE_URL=''
614614

@@ -1211,7 +1211,7 @@ if test "$ac_init_help" = "long"; then
12111211
# Omit some internal or obsolete options to make the list less imposing.
12121212
# This message is too long to be a string in the A/UX 3.1 sh.
12131213
cat <<_ACEOF
1214-
\`configure' configures lightgbm 4.4.0.99 to adapt to many kinds of systems.
1214+
\`configure' configures lightgbm 4.5.0.99 to adapt to many kinds of systems.
12151215
12161216
Usage: $0 [OPTION]... [VAR=VALUE]...
12171217
@@ -1273,7 +1273,7 @@ fi
12731273

12741274
if test -n "$ac_init_help"; then
12751275
case $ac_init_help in
1276-
short | recursive ) echo "Configuration of lightgbm 4.4.0.99:";;
1276+
short | recursive ) echo "Configuration of lightgbm 4.5.0.99:";;
12771277
esac
12781278
cat <<\_ACEOF
12791279
@@ -1341,7 +1341,7 @@ fi
13411341
test -n "$ac_init_help" && exit $ac_status
13421342
if $ac_init_version; then
13431343
cat <<\_ACEOF
1344-
lightgbm configure 4.4.0.99
1344+
lightgbm configure 4.5.0.99
13451345
generated by GNU Autoconf 2.71
13461346
13471347
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1378,7 +1378,7 @@ cat >config.log <<_ACEOF
13781378
This file contains any messages produced by compilers while
13791379
running configure, to aid debugging if configure makes a mistake.
13801380
1381-
It was created by lightgbm $as_me 4.4.0.99, which was
1381+
It was created by lightgbm $as_me 4.5.0.99, which was
13821382
generated by GNU Autoconf 2.71. Invocation command line was
13831383
13841384
$ $0$ac_configure_args_raw
@@ -2454,7 +2454,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24542454
# report actual input values of CONFIG_FILES etc. instead of their
24552455
# values after options handling.
24562456
ac_log="
2457-
This file was extended by lightgbm $as_me 4.4.0.99, which was
2457+
This file was extended by lightgbm $as_me 4.5.0.99, which was
24582458
generated by GNU Autoconf 2.71. Invocation command line was
24592459
24602460
CONFIG_FILES = $CONFIG_FILES
@@ -2509,7 +2509,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
25092509
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25102510
ac_cs_config='$ac_cs_config_escaped'
25112511
ac_cs_version="\\
2512-
lightgbm config.status 4.4.0.99
2512+
lightgbm config.status 4.5.0.99
25132513
configured by $0, generated by GNU Autoconf 2.71,
25142514
with options \\"\$ac_cs_config\\"
25152515

R-package/cran-comments.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# CRAN Submission History
22

3+
## v4.5.0 - Submission 1 - (July 25, 2024)
4+
5+
### CRAN response
6+
7+
Accepted to CRAN
8+
9+
### Maintainer Notes
10+
11+
This release was a response to a request from CRAN.
12+
On July 4, 2024, CRAN notified us that the following compiler warnings raised by `gcc` 14 needed to be fixed by August 3, 2024.
13+
14+
```text
15+
Result: WARN
16+
Found the following significant warnings:
17+
io/dense_bin.hpp:617:27: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
18+
io/multi_val_dense_bin.hpp:346:26: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
19+
io/multi_val_sparse_bin.hpp:433:36: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
20+
io/sparse_bin.hpp:785:19: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
21+
See ‘/data/gannet/ripley/R/packages/tests-devel/lightgbm.Rcheck/00install.out’ for details.
22+
```
23+
24+
This release contains fixes for those issues.
25+
326
## v4.4.0 - Submission 1 - (June 14, 2024)
427

528
### CRAN response

R-package/man/lgb.Dataset.Rd

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
Light Gradient Boosting Machine
44
===============================
55

6-
[![Python-package GitHub Actions Build Status](https://github.com/microsoft/LightGBM/workflows/Python-package/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions)
7-
[![R-package GitHub Actions Build Status](https://github.com/microsoft/LightGBM/workflows/R-package/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions)
8-
[![CUDA Version GitHub Actions Build Status](https://github.com/microsoft/LightGBM/workflows/CUDA%20Version/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions)
9-
[![Static Analysis GitHub Actions Build Status](https://github.com/microsoft/LightGBM/workflows/Static%20Analysis/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions)
6+
[![Python-package GitHub Actions Build Status](https://github.com/microsoft/LightGBM/actions/workflows/python_package.yml/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions/workflows/python_package.yml)
7+
[![R-package GitHub Actions Build Status](https://github.com/microsoft/LightGBM/actions/workflows/r_package.yml/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions/workflows/r_package.yml)
8+
[![CUDA Version GitHub Actions Build Status](https://github.com/microsoft/LightGBM/actions/workflows/cuda.yml/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions/workflows/cuda.yml)
9+
[![Static Analysis GitHub Actions Build Status](https://github.com/microsoft/LightGBM/actions/workflows/static_analysis.yml/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions/workflows/static_analysis.yml)
1010
[![Azure Pipelines Build Status](https://lightgbm-ci.visualstudio.com/lightgbm-ci/_apis/build/status/Microsoft.LightGBM?branchName=master)](https://lightgbm-ci.visualstudio.com/lightgbm-ci/_build/latest?definitionId=1)
1111
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/1ys5ot401m0fep6l/branch/master?svg=true)](https://ci.appveyor.com/project/guolinke/lightgbm/branch/master)
1212
[![Documentation Status](https://readthedocs.org/projects/lightgbm/badge/?version=latest)](https://lightgbm.readthedocs.io/)
13-
[![Link checks](https://github.com/microsoft/LightGBM/workflows/Link%20checks/badge.svg)](https://github.com/microsoft/LightGBM/actions?query=workflow%3A%22Link+checks%22)
13+
[![Link checks](https://github.com/microsoft/LightGBM/actions/workflows/linkchecker.yml/badge.svg?branch=master)](https://github.com/microsoft/LightGBM/actions/workflows/linkchecker.yml)
1414
[![License](https://img.shields.io/github/license/microsoft/lightgbm.svg)](https://github.com/microsoft/LightGBM/blob/master/LICENSE)
1515
[![Python Versions](https://img.shields.io/pypi/pyversions/lightgbm.svg?logo=python&logoColor=white)](https://pypi.org/project/lightgbm)
1616
[![PyPI Version](https://img.shields.io/pypi/v/lightgbm.svg?logo=pypi&logoColor=white)](https://pypi.org/project/lightgbm)
17+
[![conda Version](https://img.shields.io/conda/vn/conda-forge/lightgbm?logo=conda-forge&logoColor=white&label=conda)](https://anaconda.org/conda-forge/lightgbm)
1718
[![CRAN Version](https://www.r-pkg.org/badges/version/lightgbm)](https://cran.r-project.org/package=lightgbm)
1819
[![NuGet Version](https://img.shields.io/nuget/v/lightgbm?logo=nuget&logoColor=white)](https://www.nuget.org/packages/LightGBM)
1920

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.4.0.99
1+
4.5.0.99

build-python.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,19 @@ fi
359359
if test "${INSTALL}" = true; then
360360
echo "--- installing lightgbm ---"
361361
cd ../dist
362+
if test "${BUILD_WHEEL}" = true; then
363+
PACKAGE_NAME="lightgbm*.whl"
364+
else
365+
PACKAGE_NAME="lightgbm*.tar.gz"
366+
fi
362367
# ref for use of '--find-links': https://stackoverflow.com/a/52481267/3986677
363368
pip install \
364369
${PIP_INSTALL_ARGS} \
365-
--ignore-installed \
370+
--force-reinstall \
366371
--no-cache-dir \
367372
--no-deps \
368373
--find-links=. \
369-
lightgbm
374+
${PACKAGE_NAME}
370375
cd ../
371376
fi
372377

docs/Parameters.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ Core Parameters
149149

150150
- ``goss``, Gradient-based One-Side Sampling
151151

152-
- *New in 4.0.0*
152+
- *New in version 4.0.0*
153153

154154
- ``data`` :raw-html:`<a id="data" title="Permalink to this parameter" href="#data">&#x1F517;&#xFE0E;</a>`, default = ``""``, type = string, aliases: ``train``, ``train_data``, ``train_data_file``, ``data_filename``
155155

@@ -414,7 +414,7 @@ Learning Control Parameters
414414

415415
- when early stopping is used (i.e. ``early_stopping_round > 0``), require the early stopping metric to improve by at least this delta to be considered an improvement
416416

417-
- *New in 4.4.0*
417+
- *New in version 4.4.0*
418418

419419
- ``first_metric_only`` :raw-html:`<a id="first_metric_only" title="Permalink to this parameter" href="#first_metric_only">&#x1F517;&#xFE0E;</a>`, default = ``false``, type = bool
420420

@@ -692,7 +692,7 @@ Learning Control Parameters
692692

693693
- **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
694694

695-
- *New in 4.0.0*
695+
- *New in version 4.0.0*
696696

697697
- ``quant_train_renew_leaf`` :raw-html:`<a id="quant_train_renew_leaf" title="Permalink to this parameter" href="#quant_train_renew_leaf">&#x1F517;&#xFE0E;</a>`, default = ``false``, type = bool
698698

@@ -702,15 +702,15 @@ Learning Control Parameters
702702

703703
- **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
704704

705-
- *New in 4.0.0*
705+
- *New in version 4.0.0*
706706

707707
- ``stochastic_rounding`` :raw-html:`<a id="stochastic_rounding" title="Permalink to this parameter" href="#stochastic_rounding">&#x1F517;&#xFE0E;</a>`, default = ``true``, type = bool
708708

709709
- whether to use stochastic rounding in gradient quantization
710710

711711
- **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
712712

713-
- *New in 4.0.0*
713+
- *New in version 4.0.0*
714714

715715
IO Parameters
716716
-------------
@@ -930,7 +930,7 @@ Dataset Parameters
930930

931931
- **Note**: ``lightgbm-transform`` is not maintained by LightGBM's maintainers. Bug reports or feature requests should go to `issues page <https://github.com/microsoft/lightgbm-transform/issues>`__
932932

933-
- *New in 4.0.0*
933+
- *New in version 4.0.0*
934934

935935
Predict Parameters
936936
~~~~~~~~~~~~~~~~~~

docs/env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- r-markdown=1.12
1313
- r-matrix=1.6_4
1414
- r-pkgdown=2.0.7
15-
- r-roxygen2=7.3.1
15+
- r-roxygen2=7.3.2
1616
- scikit-learn>=1.4.0
1717
- sphinx>=6.0
1818
- sphinx_rtd_theme>=2.0

include/LightGBM/config.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ struct Config {
181181
// desc = ``bagging``, Randomly Bagging Sampling
182182
// descl2 = **Note**: ``bagging`` is only effective when ``bagging_freq > 0`` and ``bagging_fraction < 1.0``
183183
// desc = ``goss``, Gradient-based One-Side Sampling
184-
// desc = *New in 4.0.0*
184+
// desc = *New in version 4.0.0*
185185
std::string data_sample_strategy = "bagging";
186186

187187
// alias = train, train_data, train_data_file, data_filename
@@ -396,7 +396,7 @@ struct Config {
396396

397397
// check = >=0.0
398398
// desc = when early stopping is used (i.e. ``early_stopping_round > 0``), require the early stopping metric to improve by at least this delta to be considered an improvement
399-
// desc = *New in 4.4.0*
399+
// desc = *New in version 4.4.0*
400400
double early_stopping_min_delta = 0.0;
401401

402402
// desc = LightGBM allows you to provide multiple evaluation metrics. Set this to ``true``, if you want to use only the first metric for early stopping
@@ -626,18 +626,18 @@ struct Config {
626626
// desc = number of bins to quantization gradients and hessians
627627
// desc = with more bins, the quantized training will be closer to full precision training
628628
// desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
629-
// desc = *New in 4.0.0*
629+
// desc = *New in version 4.0.0*
630630
int num_grad_quant_bins = 4;
631631

632632
// desc = whether to renew the leaf values with original gradients when quantized training
633633
// desc = renewing is very helpful for good quantized training accuracy for ranking objectives
634634
// desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
635-
// desc = *New in 4.0.0*
635+
// desc = *New in version 4.0.0*
636636
bool quant_train_renew_leaf = false;
637637

638638
// desc = whether to use stochastic rounding in gradient quantization
639639
// desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda``
640-
// desc = *New in 4.0.0*
640+
// desc = *New in version 4.0.0*
641641
bool stochastic_rounding = true;
642642

643643
#ifndef __NVCC__
@@ -801,7 +801,7 @@ struct Config {
801801
// desc = path to a ``.json`` file that specifies customized parser initialized configuration
802802
// desc = see `lightgbm-transform <https://github.com/microsoft/lightgbm-transform>`__ for usage examples
803803
// desc = **Note**: ``lightgbm-transform`` is not maintained by LightGBM's maintainers. Bug reports or feature requests should go to `issues page <https://github.com/microsoft/lightgbm-transform/issues>`__
804-
// desc = *New in 4.0.0*
804+
// desc = *New in version 4.0.0*
805805
std::string parser_config_file = "";
806806

807807
#ifndef __NVCC__

python-package/README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
LightGBM Python-package
22
=======================
33

4-
|License| |Python Versions| |PyPI Version| |PyPI Downloads| |conda Downloads| |API Docs|
4+
|License| |Python Versions| |PyPI Version| |PyPI Downloads| |conda Version| |conda Downloads| |API Docs|
55

66
Installation
77
------------
@@ -296,6 +296,8 @@ To check that a contribution to the package matches its style expectations, run
296296
:target: https://pypi.org/project/lightgbm
297297
.. |PyPI Downloads| image:: https://img.shields.io/pepy/dt/lightgbm?logo=pypi&logoColor=white&label=pypi%20downloads
298298
:target: https://pepy.tech/project/lightgbm
299+
.. |conda Version| image:: https://img.shields.io/conda/vn/conda-forge/lightgbm?logo=conda-forge&logoColor=white&label=conda
300+
:target: https://anaconda.org/conda-forge/lightgbm
299301
.. |conda Downloads| image:: https://img.shields.io/conda/d/conda-forge/lightgbm?logo=conda-forge&logoColor=white&label=conda%20downloads
300302
:target: https://anaconda.org/conda-forge/lightgbm/files
301303
.. |API Docs| image:: https://readthedocs.org/projects/lightgbm/badge/?version=latest

python-package/lightgbm/basic.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1745,7 +1745,15 @@ def current_iteration(self) -> int:
17451745

17461746

17471747
class Dataset:
1748-
"""Dataset in LightGBM."""
1748+
"""
1749+
Dataset in LightGBM.
1750+
1751+
LightGBM does not train on raw data.
1752+
It discretizes continuous features into histogram bins, tries to combine categorical features,
1753+
and automatically handles missing and infinite values.
1754+
1755+
This class handles that preprocessing, and holds that alternative representation of the input data.
1756+
"""
17491757

17501758
def __init__(
17511759
self,

python-package/lightgbm/sklearn.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,10 @@ def feature_name_(self) -> List[str]:
11571157

11581158
@property
11591159
def feature_names_in_(self) -> np.ndarray:
1160-
""":obj:`array` of shape = [n_features]: scikit-learn compatible version of ``.feature_name_``."""
1160+
""":obj:`array` of shape = [n_features]: scikit-learn compatible version of ``.feature_name_``.
1161+
1162+
.. versionadded:: 4.5.0
1163+
"""
11611164
if not self.__sklearn_is_fitted__():
11621165
raise LGBMNotFittedError("No feature_names_in_ found. Need to call fit beforehand.")
11631166
return np.array(self.feature_name_)

python-package/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ maintainers = [
3030
name = "lightgbm"
3131
readme = "README.rst"
3232
requires-python = ">=3.7"
33-
version = "4.4.0.99"
33+
version = "4.5.0.99"
3434

3535
[project.optional-dependencies]
3636
arrow = [

0 commit comments

Comments
 (0)