Skip to content

Commit f7c641d

Browse files
authored
[ci] [dask] test lightgbm.dask on macOS (#6677)
* [ci] [Dask] enable Dask tests on macOS * fix windows condition * fix merge conflicts
1 parent 6b624fb commit f7c641d

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

.vsts-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ jobs:
254254
- script: |
255255
git clean -d -f -x
256256
displayName: 'Clean source directory'
257+
# LGBM_SKIP_DASK_TESTS=true is set below only because running the tests under emulation is so slow...
258+
# in theory, 'lightgbm.dask' should work without issue on aarch64 Linux systems.
259+
# That could probably be removed as part of https://github.com/microsoft/LightGBM/issues/6788
257260
- script: |
258261
cat > docker-script.sh <<EOF
259262
export CONDA=\$HOME/miniforge
@@ -273,6 +276,7 @@ jobs:
273276
--env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \
274277
--env BUILD_DIRECTORY=$BUILD_DIRECTORY \
275278
--env COMPILER=$COMPILER \
279+
--env LGBM_SKIP_DASK_TESTS=true \
276280
--env METHOD=$METHOD \
277281
--env OS_NAME=linux \
278282
--env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \

docs/Parallel-Learning-Guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ LightGBM's Python-package supports distributed learning via `Dask`_. This integr
6464

6565
.. warning::
6666

67-
Dask integration is only tested on Linux.
67+
Dask integration is only tested on macOS and Linux.
6868

6969
Dask Examples
7070
'''''''''''''

tests/python_package_test/test_dask.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import socket
66
from itertools import groupby
77
from os import getenv
8-
from platform import machine
98
from sys import platform
109
from urllib.parse import urlparse
1110

@@ -16,10 +15,8 @@
1615

1716
from .utils import sklearn_multiclass_custom_objective
1817

19-
if not platform.startswith("linux"):
20-
pytest.skip("lightgbm.dask is currently supported in Linux environments", allow_module_level=True)
21-
if machine() != "x86_64":
22-
pytest.skip("lightgbm.dask tests are currently skipped on some architectures like arm64", allow_module_level=True)
18+
if platform in {"cygwin", "win32"}:
19+
pytest.skip("lightgbm.dask is not currently supported on Windows", allow_module_level=True)
2320
if not lgb.compat.DASK_INSTALLED:
2421
pytest.skip("Dask is not installed", allow_module_level=True)
2522

@@ -58,6 +55,10 @@
5855
pytest.mark.skipif(getenv("TASK", "") == "mpi", reason="Fails to run with MPI interface"),
5956
pytest.mark.skipif(getenv("TASK", "") == "gpu", reason="Fails to run with GPU interface"),
6057
pytest.mark.skipif(getenv("TASK", "") == "cuda", reason="Fails to run with CUDA interface"),
58+
pytest.mark.skipif(
59+
getenv("LGBM_SKIP_DASK_TESTS", "") == "true",
60+
reason="Skipping lightgbm.dask tests (found env variable LGBM_SKIP_DASK_TESTS=true)",
61+
),
6162
]
6263

6364

0 commit comments

Comments
 (0)