Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
6453a041
Unverified
Commit
6453a041
authored
Oct 09, 2025
by
Nikita Titov
Committed by
GitHub
Oct 09, 2025
Browse files
Merge branch 'master' into rocm3
parents
552fafc7
a8baffa6
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
157 additions
and
35 deletions
+157
-35
.appveyor.yml
.appveyor.yml
+0
-1
.ci/setup.sh
.ci/setup.sh
+1
-1
.ci/test-windows.ps1
.ci/test-windows.ps1
+1
-1
.github/workflows/cpp.yml
.github/workflows/cpp.yml
+148
-0
.github/workflows/python_package.yml
.github/workflows/python_package.yml
+0
-3
.pre-commit-config.yaml
.pre-commit-config.yaml
+2
-2
.vsts-ci.yml
.vsts-ci.yml
+0
-13
docs/build-docs.sh
docs/build-docs.sh
+1
-1
tests/python_package_test/test_arrow.py
tests/python_package_test/test_arrow.py
+4
-13
No files found.
.appveyor.yml
View file @
6453a041
...
...
@@ -24,7 +24,6 @@ install:
-
set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
-
set PYTHON_VERSION=%CONFIGURATION%
-
ps
:
|
$env:ALLOW_SKIP_ARROW_TESTS = "1"
$env:APPVEYOR = "true"
$env:CMAKE_BUILD_PARALLEL_LEVEL = 4
$env:MINICONDA = "C:\Miniconda3-x64"
...
...
.ci/setup.sh
View file @
6453a041
...
...
@@ -153,7 +153,7 @@ if [[ "${TASK}" != "cpp-tests" ]] && [[ "${TASK}" != "r-package" ]]; then
sh miniforge.sh
-b
-p
"
${
CONDA
}
"
fi
conda config
--set
always_yes
yes
--set
changeps1 no
conda update
-q
-y
conda
conda-libmamba-solver
conda update
-q
-y
conda
# print output of 'conda info', to help in submitting bug reports
echo
"conda info:"
...
...
.ci/test-windows.ps1
View file @
6453a041
...
...
@@ -66,7 +66,7 @@ if ($env:TASK -eq "swig") {
conda
init
powershell
conda
activate
conda
config
--set
always_yes
yes
--set
changeps1
no
conda
update
-q
-y
conda
conda-libmamba-solver
"python=
$
env
:
PYTHON_VERSION
[build=*_cp*]"
conda
update
-q
-y
conda
"python=
$
env
:
PYTHON_VERSION
[build=*_cp*]"
# print output of 'conda info', to help in submitting bug reports
Write-Output
"conda info:"
...
...
.github/workflows/cpp.yml
0 → 100644
View file @
6453a041
name
:
C++
on
:
push
:
branches
:
-
master
pull_request
:
branches
:
-
master
# automatically cancel in-progress builds if another commit is pushed
concurrency
:
group
:
${{ github.workflow }}-${{ github.ref }}
cancel-in-progress
:
true
env
:
# tell scripts where to put artifacts
# (this variable name is left over from when jobs ran on Azure DevOps)
BUILD_ARTIFACTSTAGINGDIRECTORY
:
'
${{
github.workspace
}}/artifacts'
# where repo sources are cloned to
BUILD_DIRECTORY
:
'
${{
github.workspace
}}'
# in CMake-driven builds, parallelize compilation
CMAKE_BUILD_PARALLEL_LEVEL
:
4
jobs
:
test
:
name
:
${{ matrix.task }} (${{ matrix.os-display-name || matrix.os }}, ${{ matrix.compiler }})
runs-on
:
${{ matrix.os }}
container
:
${{ matrix.container }}
timeout-minutes
:
60
strategy
:
fail-fast
:
false
matrix
:
include
:
#############
# C++ tests #
#############
-
os
:
ubuntu-latest
task
:
cpp-tests
compiler
:
clang-17
method
:
with-sanitizers
container
:
'
ubuntu:22.04'
os-display-name
:
'
ubuntu22.04'
-
os
:
macos-13
task
:
cpp-tests
compiler
:
clang
method
:
with-sanitizers
sanitizers
:
"
address;undefined"
container
:
null
-
os
:
windows-2022
task
:
cpp-tests
compiler
:
msvc
container
:
null
###########
# if-else #
###########
# These test CLI-generated C++ inference code.
#
# They need Python because they're written with pytest, but they
# do not need the LightGBM Python package
-
os
:
ubuntu-latest
task
:
if-else
compiler
:
clang-17
container
:
'
ubuntu:22.04'
os-display-name
:
'
ubuntu22.04'
python_version
:
'
3.13'
setup-conda
:
'
true'
-
os
:
macos-13
task
:
if-else
compiler
:
clang
python_version
:
'
3.10'
container
:
null
-
os
:
ubuntu-latest
task
:
if-else
compiler
:
gcc
python_version
:
'
3.11'
container
:
'
lightgbm.azurecr.io/vsts-agent:manylinux_2_28_x86_64'
os-display-name
:
'
manylinux_2_28'
steps
:
-
name
:
Install packages used by third-party actions
if
:
matrix.container == 'ubuntu:22.04'
shell
:
bash
run
:
|
apt-get update -y
apt-get install --no-install-recommends -y \
dirmngr \
gpg \
gpg-agent \
software-properties-common \
sudo
# install newest version of git
# ref:
# - https://unix.stackexchange.com/a/170831/550004
# - https://git-scm.com/download/linux
add-apt-repository ppa:git-core/ppa -y
apt-get update -y
apt-get install --no-install-recommends -y \
git
-
name
:
Trust git cloning LightGBM
if
:
startsWith(matrix.os, 'ubuntu')
run
:
|
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
-
name
:
Checkout repository
uses
:
actions/checkout@v5
with
:
fetch-depth
:
5
persist-credentials
:
false
submodules
:
true
-
name
:
Setup and run tests on Linux and macOS
if
:
startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
shell
:
bash
run
:
|
export COMPILER="${{ matrix.compiler }}"
export CONDA="${HOME}/miniforge"
export METHOD="${{ matrix.method }}"
export PATH=${CONDA}/bin:${PATH}
export PYTHON_VERSION="${{ matrix.python_version }}"
export SANITIZERS="${{ matrix.sanitizers }}"
export SETUP_CONDA="${{ matrix.setup-conda }}"
export TASK="${{ matrix.task }}"
if [[ "${{ matrix.os }}" =~ ^macos ]]; then
export OS_NAME="macos"
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export OS_NAME="linux"
fi
if [[ "${{ matrix.container }}" == "ubuntu:22.04" ]]; then
export DEBIAN_FRONTEND=noninteractive
export IN_UBUNTU_BASE_CONTAINER="true"
fi
$GITHUB_WORKSPACE/.ci/setup.sh
$GITHUB_WORKSPACE/.ci/test.sh
-
name
:
Setup and run tests on Windows
if
:
startsWith(matrix.os, 'windows')
shell
:
pwsh -command ". {0}"
run
:
|
$env:BUILD_SOURCESDIRECTORY = $env:BUILD_DIRECTORY
$env:TASK = "${{ matrix.task }}"
& "$env:GITHUB_WORKSPACE/.ci/test-windows.ps1"
all-cpp-jobs-successful
:
if
:
always()
runs-on
:
ubuntu-latest
needs
:
-
test
steps
:
-
name
:
Note that all tests succeeded
uses
:
re-actors/alls-green@v1.2.2
with
:
jobs
:
${{ toJSON(needs) }}
.github/workflows/python_package.yml
View file @
6453a041
...
...
@@ -86,9 +86,6 @@ jobs:
-
os
:
macos-13
task
:
bdist
python_version
:
'
3.9'
-
os
:
macos-13
task
:
if-else
python_version
:
'
3.10'
-
os
:
macos-14
task
:
bdist
method
:
wheel
...
...
.pre-commit-config.yaml
View file @
6453a041
...
...
@@ -63,10 +63,10 @@ repos:
-
sphinx_rtd_theme>=3.0.1
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev
:
v0.1
2.5
rev
:
v0.1
4.0
hooks
:
# Run the linter.
-
id
:
ruff
-
id
:
ruff
-check
args
:
[
"
--config"
,
"
python-package/pyproject.toml"
]
types_or
:
[
python
,
jupyter
]
# Run the formatter.
...
...
.vsts-ci.yml
View file @
6453a041
...
...
@@ -103,8 +103,6 @@ jobs:
bdist
:
TASK
:
bdist
PYTHON_VERSION
:
'
3.10'
inference
:
TASK
:
if-else
mpi_source
:
TASK
:
mpi
METHOD
:
source
...
...
@@ -168,8 +166,6 @@ jobs:
bdist
:
TASK
:
bdist
PYTHON_VERSION
:
'
3.11'
inference
:
TASK
:
if-else
mpi_source
:
TASK
:
mpi
METHOD
:
source
...
...
@@ -193,9 +189,6 @@ jobs:
TASK
:
gpu
METHOD
:
wheel
PYTHON_VERSION
:
'
3.10'
cpp_tests
:
TASK
:
cpp-tests
METHOD
:
with-sanitizers
steps
:
-
script
:
|
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
...
...
@@ -245,10 +238,6 @@ jobs:
TASK
:
bdist
swig
:
TASK
:
swig
cpp_tests
:
TASK
:
cpp-tests
METHOD
:
with-sanitizers
SANITIZERS
:
"
address;undefined"
steps
:
-
script
:
|
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
...
...
@@ -299,8 +288,6 @@ jobs:
TASK
:
bdist
swig
:
TASK
:
swig
cpp_tests
:
TASK
:
cpp-tests
steps
:
-
powershell
:
|
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
...
...
docs/build-docs.sh
View file @
6453a041
...
...
@@ -14,7 +14,7 @@ curl \
/bin/bash
"
${
HOME
}
/miniforge.sh"
-b
-p
"
${
CONDA
}
"
conda config
--set
always_yes
yes
--set
changeps1 no
conda update
-q
-y
conda
conda-libmamba-solver
conda update
-q
-y
conda
conda
env
create
\
--name
docs-env
\
...
...
tests/python_package_test/test_arrow.py
View file @
6453a041
# coding: utf-8
import
filecmp
import
os
from
pathlib
import
Path
from
typing
import
Any
,
Dict
,
Optional
...
...
@@ -11,18 +10,10 @@ import lightgbm as lgb
from
.utils
import
np_assert_array_equal
# NOTE: In the AppVeyor CI, importing pyarrow fails due to an old Visual Studio version. Hence,
# we conditionally import pyarrow here (and skip tests if it cannot be imported). However, we
# don't want these tests to silently be skipped, hence, we only conditionally import when a
# specific env var is set.
if
os
.
getenv
(
"ALLOW_SKIP_ARROW_TESTS"
)
==
"1"
:
pa
=
pytest
.
importorskip
(
"pyarrow"
)
else
:
import
pyarrow
as
pa
# type: ignore
assert
lgb
.
compat
.
PYARROW_INSTALLED
is
True
,
(
"'pyarrow' and its dependencies must be installed to run the arrow tests"
)
if
not
lgb
.
compat
.
PYARROW_INSTALLED
:
pytest
.
skip
(
"pyarrow is not installed"
,
allow_module_level
=
True
)
import
pyarrow
as
pa
# ----------------------------------------------------------------------------------------------- #
# UTILITIES #
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment