Unverified Commit f7c641d9 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[ci] [dask] test `lightgbm.dask` on macOS (#6677)

* [ci] [Dask] enable Dask tests on macOS

* fix windows condition

* fix merge conflicts
parent 6b624fb5
...@@ -254,6 +254,9 @@ jobs: ...@@ -254,6 +254,9 @@ jobs:
- script: | - script: |
git clean -d -f -x git clean -d -f -x
displayName: 'Clean source directory' displayName: 'Clean source directory'
# LGBM_SKIP_DASK_TESTS=true is set below only because running the tests under emulation is so slow...
# in theory, 'lightgbm.dask' should work without issue on aarch64 Linux systems.
# That could probably be removed as part of https://github.com/microsoft/LightGBM/issues/6788
- script: | - script: |
cat > docker-script.sh <<EOF cat > docker-script.sh <<EOF
export CONDA=\$HOME/miniforge export CONDA=\$HOME/miniforge
...@@ -273,6 +276,7 @@ jobs: ...@@ -273,6 +276,7 @@ jobs:
--env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \ --env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \
--env BUILD_DIRECTORY=$BUILD_DIRECTORY \ --env BUILD_DIRECTORY=$BUILD_DIRECTORY \
--env COMPILER=$COMPILER \ --env COMPILER=$COMPILER \
--env LGBM_SKIP_DASK_TESTS=true \
--env METHOD=$METHOD \ --env METHOD=$METHOD \
--env OS_NAME=linux \ --env OS_NAME=linux \
--env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \ --env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \
......
...@@ -64,7 +64,7 @@ LightGBM's Python-package supports distributed learning via `Dask`_. This integr ...@@ -64,7 +64,7 @@ LightGBM's Python-package supports distributed learning via `Dask`_. This integr
.. warning:: .. warning::
Dask integration is only tested on Linux. Dask integration is only tested on macOS and Linux.
Dask Examples Dask Examples
''''''''''''' '''''''''''''
......
...@@ -5,7 +5,6 @@ import inspect ...@@ -5,7 +5,6 @@ import inspect
import socket import socket
from itertools import groupby from itertools import groupby
from os import getenv from os import getenv
from platform import machine
from sys import platform from sys import platform
from urllib.parse import urlparse from urllib.parse import urlparse
...@@ -16,10 +15,8 @@ import lightgbm as lgb ...@@ -16,10 +15,8 @@ import lightgbm as lgb
from .utils import sklearn_multiclass_custom_objective from .utils import sklearn_multiclass_custom_objective
if not platform.startswith("linux"): if platform in {"cygwin", "win32"}:
pytest.skip("lightgbm.dask is currently supported in Linux environments", allow_module_level=True) pytest.skip("lightgbm.dask is not currently supported on Windows", allow_module_level=True)
if machine() != "x86_64":
pytest.skip("lightgbm.dask tests are currently skipped on some architectures like arm64", allow_module_level=True)
if not lgb.compat.DASK_INSTALLED: if not lgb.compat.DASK_INSTALLED:
pytest.skip("Dask is not installed", allow_module_level=True) pytest.skip("Dask is not installed", allow_module_level=True)
...@@ -58,6 +55,10 @@ pytestmark = [ ...@@ -58,6 +55,10 @@ pytestmark = [
pytest.mark.skipif(getenv("TASK", "") == "mpi", reason="Fails to run with MPI interface"), pytest.mark.skipif(getenv("TASK", "") == "mpi", reason="Fails to run with MPI interface"),
pytest.mark.skipif(getenv("TASK", "") == "gpu", reason="Fails to run with GPU interface"), pytest.mark.skipif(getenv("TASK", "") == "gpu", reason="Fails to run with GPU interface"),
pytest.mark.skipif(getenv("TASK", "") == "cuda", reason="Fails to run with CUDA interface"), pytest.mark.skipif(getenv("TASK", "") == "cuda", reason="Fails to run with CUDA interface"),
pytest.mark.skipif(
getenv("LGBM_SKIP_DASK_TESTS", "") == "true",
reason="Skipping lightgbm.dask tests (found env variable LGBM_SKIP_DASK_TESTS=true)",
),
] ]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment