Skip to content

Commit 220f7db

Browse files
committed
Merge branch 'master' into newer-scikit-build-core
2 parents 8c6a8e3 + 252828f commit 220f7db

File tree

11 files changed

+134
-58
lines changed

11 files changed

+134
-58
lines changed

.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 4.2.0.99.{build}
1+
version: 4.3.0.{build}
22

33
image: Visual Studio 2015
44
platform: x64

.ci/install-clang-devel.sh

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/bash
2+
3+
# [description]
4+
#
5+
# Installs a development version of clang and the other LLVM tools.
6+
#
7+
8+
set -e -E -u -o pipefail
9+
10+
CLANG_VERSION=${1}
11+
12+
apt-get autoremove -y --purge \
13+
clang-* \
14+
libclang-* \
15+
libunwind-* \
16+
llvm-*
17+
18+
apt-get update -y
19+
apt-get install --no-install-recommends -y \
20+
gnupg \
21+
lsb-release \
22+
software-properties-common \
23+
wget
24+
25+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
26+
27+
# ref: https://apt.llvm.org/
28+
add-apt-repository -y "deb http://apt.llvm.org/unstable/ llvm-toolchain main"
29+
add-apt-repository -y "deb-src http://apt.llvm.org/unstable/ llvm-toolchain main"
30+
31+
apt-get install -y --no-install-recommends \
32+
clang-${CLANG_VERSION} \
33+
clangd-${CLANG_VERSION} \
34+
clang-format-${CLANG_VERSION} \
35+
clang-tidy-${CLANG_VERSION} \
36+
clang-tools-${CLANG_VERSION} \
37+
lldb-${CLANG_VERSION} \
38+
lld-${CLANG_VERSION} \
39+
llvm-${CLANG_VERSION}-dev \
40+
llvm-${CLANG_VERSION}-tools \
41+
libomp-${CLANG_VERSION}-dev \
42+
libc++-${CLANG_VERSION}-dev \
43+
libc++abi-${CLANG_VERSION}-dev \
44+
libclang-common-${CLANG_VERSION}-dev \
45+
libclang-${CLANG_VERSION}-dev \
46+
libclang-cpp${CLANG_VERSION}-dev \
47+
libunwind-${CLANG_VERSION}-dev
48+
49+
# overwriting the stuff in /usr/bin is simpler and more reliable than
50+
# updating PATH, LD_LIBRARY_PATH, etc.
51+
cp --remove-destination /usr/lib/llvm-${CLANG_VERSION}/bin/* /usr/bin/
52+
53+
# per https://www.stats.ox.ac.uk/pub/bdr/Rconfig/r-devel-linux-x86_64-fedora-clang
54+
#
55+
# clang was built to use libc++: for a version built to default to libstdc++
56+
# (as shipped by Fedora/Debian/Ubuntu), add -stdlib=libc++ to CXX
57+
# and install the libcxx-devel/libc++-dev package.
58+
mkdir -p "${HOME}/.R"
59+
60+
cat << EOF > "${HOME}/.R/Makevars"
61+
CXX += -stdlib=libc++
62+
CXX11 += -stdlib=libc++
63+
CXX14 += -stdlib=libc++
64+
CXX17 += -stdlib=libc++
65+
CXX20 += -stdlib=libc++
66+
EOF
67+
68+
echo ""
69+
echo "done installing clang"
70+
clang --version
71+
echo ""

.ci/test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ matplotlib.use\(\"Agg\"\)\
319319
jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb || exit -1 # run all notebooks
320320

321321
# importing the library should succeed even if all optional dependencies are not present
322-
conda uninstall --force --yes \
322+
conda uninstall -n $CONDA_ENV --force --yes \
323323
cffi \
324-
dask \
324+
dask-core \
325325
distributed \
326326
joblib \
327327
matplotlib \

.github/workflows/r_package.yml

+19-40
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,21 @@ jobs:
258258
cat ./tests.log
259259
exit ${exit_code}
260260
test-r-debian-clang:
261-
name: r-package (debian, R-devel, clang)
261+
name: r-package (debian, R-devel, clang-${{ matrix.clang-version }})
262262
timeout-minutes: 60
263+
strategy:
264+
fail-fast: false
265+
matrix:
266+
# list of versions tested in CRAN "Additional Checks":
267+
# https://cran.r-project.org/web/checks/check_issue_kinds.html
268+
clang-version:
269+
- 16
270+
- 17
271+
- 18
263272
runs-on: ubuntu-latest
264273
container: rhub/debian-clang-devel
274+
env:
275+
DEBIAN_FRONTEND: noninteractive
265276
steps:
266277
- name: Install Git before checkout
267278
shell: bash
@@ -276,53 +287,21 @@ jobs:
276287
with:
277288
fetch-depth: 5
278289
submodules: true
279-
- name: update to clang 15
280-
shell: bash
290+
- name: install clang
281291
run: |
282-
# remove clang stuff that comes installed in the image
283-
apt-get autoremove -y --purge \
284-
clang-* \
285-
libclang-* \
286-
libunwind-* \
287-
llvm-*
288-
#
289-
# replace it all with clang-15
290-
apt-get update -y
291-
apt-get install --no-install-recommends -y \
292-
gnupg \
293-
lsb-release \
294-
software-properties-common \
295-
wget
296-
#
297-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
298-
#
299-
add-apt-repository "deb http://apt.llvm.org/unstable/ llvm-toolchain main"
300-
apt-get install -y --no-install-recommends \
301-
clang-15 \
302-
clangd-15 \
303-
clang-format-15 \
304-
clang-tidy-15 \
305-
clang-tools-15 \
306-
lldb-15 \
307-
lld-15 \
308-
llvm-15-dev \
309-
llvm-15-tools \
310-
libomp-15-dev \
311-
libc++-15-dev \
312-
libc++abi-15-dev \
313-
libclang-common-15-dev \
314-
libclang-15-dev \
315-
libclang-cpp15-dev \
316-
libunwind-15-dev
317-
# overwrite everything in /usr/bin with the new v15 versions
318-
cp --remove-destination /usr/lib/llvm-15/bin/* /usr/bin/
292+
./.ci/install-clang-devel.sh ${{ matrix.clang-version }}
319293
- name: Install packages and run tests
320294
shell: bash
321295
run: |
322296
export PATH=/opt/R-devel/bin/:${PATH}
323297
Rscript -e "install.packages(c('R6', 'data.table', 'jsonlite', 'knitr', 'markdown', 'Matrix', 'RhpcBLASctl', 'testthat'), repos = 'https://cran.rstudio.com', Ncpus = parallel::detectCores())"
324298
sh build-cran-package.sh
325299
R CMD check --as-cran --run-donttest lightgbm_*.tar.gz || exit -1
300+
echo ""
301+
echo "install logs:"
302+
echo ""
303+
cat lightgbm.Rcheck/00install.out
304+
echo ""
326305
if grep -q -E "NOTE|WARNING|ERROR" lightgbm.Rcheck/00check.log; then
327306
echo "NOTEs, WARNINGs, or ERRORs have been found by R CMD check"
328307
exit -1

CMakeLists.txt

+9-2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ if(USE_CUDA)
215215
list(APPEND CUDA_ARCHS "8.7")
216216
endif()
217217
if(CUDA_VERSION VERSION_GREATER_EQUAL "11.8")
218+
list(APPEND CUDA_ARCHS "8.9")
218219
list(APPEND CUDA_ARCHS "9.0")
219220
endif()
220221
list(POP_BACK CUDA_ARCHS CUDA_LAST_SUPPORTED_ARCH)
@@ -428,7 +429,10 @@ file(
428429
src/network/*.cpp
429430
src/treelearner/*.cpp
430431
src/utils/*.cpp
431-
if(USE_CUDA)
432+
)
433+
file(
434+
GLOB
435+
LGBM_CUDA_SOURCES
432436
src/treelearner/*.cu
433437
src/boosting/cuda/*.cpp
434438
src/boosting/cuda/*.cu
@@ -442,9 +446,12 @@ if(USE_CUDA)
442446
src/io/cuda/*.cpp
443447
src/cuda/*.cpp
444448
src/cuda/*.cu
445-
endif()
446449
)
447450

451+
if(USE_CUDA)
452+
list(APPEND SOURCES ${LGBM_CUDA_SOURCES})
453+
endif()
454+
448455
add_library(lightgbm_objs OBJECT ${SOURCES})
449456

450457
if(BUILD_CLI)

R-package/configure

+9-9
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.2.0.99.
3+
# Generated by GNU Autoconf 2.71 for lightgbm 4.3.0.
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.2.0.99'
611-
PACKAGE_STRING='lightgbm 4.2.0.99'
610+
PACKAGE_VERSION='4.3.0'
611+
PACKAGE_STRING='lightgbm 4.3.0'
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.2.0.99 to adapt to many kinds of systems.
1214+
\`configure' configures lightgbm 4.3.0 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.2.0.99:";;
1276+
short | recursive ) echo "Configuration of lightgbm 4.3.0:";;
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.2.0.99
1344+
lightgbm configure 4.3.0
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.2.0.99, which was
1381+
It was created by lightgbm $as_me 4.3.0, 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.2.0.99, which was
2457+
This file was extended by lightgbm $as_me 4.3.0, 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.2.0.99
2512+
lightgbm config.status 4.3.0
25132513
configured by $0, generated by GNU Autoconf 2.71,
25142514
with options \\"\$ac_cs_config\\"
25152515

R-package/cran-comments.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# CRAN Submission History
22

3+
## v4.3.0 - Submission 1 - (January 18, 2024)
4+
5+
### CRAN response
6+
7+
Accepted to CRAN
8+
9+
### Maintainer Notes
10+
11+
This submission was put up in response to CRAN saying the package would be archived if the following
12+
warning was not fixed within 14 days.
13+
14+
```text
15+
/usr/local/clang-trunk/bin/../include/c++/v1/__fwd/string_view.h:22:41:
16+
warning: 'char_traits<fmt::detail::char8_type>' is deprecated:
17+
char_traits<T> for T not equal to char, wchar_t, char8_t, char16_t or char32_t is non-standard and is provided for a temporary period.
18+
It will be removed in LLVM 19, so please migrate off of it. [-Wdeprecated-declarations]
19+
```
20+
21+
See https://github.com/microsoft/LightGBM/issues/6264.
22+
323
## v4.2.0 - Submission 1 - (December 7, 2023)
424

525
### CRAN response

R-package/pkgdown/_pkgdown.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repo:
1414
user: https://github.com/
1515

1616
development:
17-
mode: unreleased
17+
mode: release
1818

1919
authors:
2020
Yu Shi:

VERSION.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2.0.99
1+
4.3.0

python-package/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ maintainers = [
3030
name = "lightgbm"
3131
readme = "README.rst"
3232
requires-python = ">=3.6"
33-
version = "4.2.0.99"
33+
version = "4.3.0"
3434

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

src/treelearner/linear_tree_learner.h

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifndef LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_
66
#define LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_
77

8-
#include <string>
98
#include <cmath>
109
#include <cstdio>
1110
#include <memory>

0 commit comments

Comments
 (0)