Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] [dask] test lightgbm.dask on macOS #6677

Merged
merged 8 commits into from
Mar 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
@@ -254,6 +254,9 @@ jobs:
- script: |
git clean -d -f -x
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
Copy link
Collaborator Author

@jameslamb jameslamb Feb 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this LGBM_SKIP_DASK_TESTS machinery could be removed if #6843 is merged before this.

If this PR is merged first, then I'll remove that stuff in #6843

- script: |
cat > docker-script.sh <<EOF
export CONDA=\$HOME/miniforge
@@ -273,6 +276,7 @@ jobs:
--env BUILD_ARTIFACTSTAGINGDIRECTORY=$BUILD_ARTIFACTSTAGINGDIRECTORY \
--env BUILD_DIRECTORY=$BUILD_DIRECTORY \
--env COMPILER=$COMPILER \
--env LGBM_SKIP_DASK_TESTS=true \
--env METHOD=$METHOD \
--env OS_NAME=linux \
--env PRODUCES_ARTIFACTS=$PRODUCES_ARTIFACTS \
2 changes: 1 addition & 1 deletion docs/Parallel-Learning-Guide.rst
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ LightGBM's Python-package supports distributed learning via `Dask`_. This integr

.. warning::

Dask integration is only tested on Linux.
Dask integration is only tested on macOS and Linux.

Dask Examples
'''''''''''''
11 changes: 6 additions & 5 deletions tests/python_package_test/test_dask.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
import socket
from itertools import groupby
from os import getenv
from platform import machine
from sys import platform
from urllib.parse import urlparse

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

from .utils import sklearn_multiclass_custom_objective

if not platform.startswith("linux"):
pytest.skip("lightgbm.dask is currently supported in Linux environments", 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 platform in {"cygwin", "win32"}:
pytest.skip("lightgbm.dask is not currently supported on Windows", allow_module_level=True)
if not lgb.compat.DASK_INSTALLED:
pytest.skip("Dask is not installed", allow_module_level=True)

@@ -58,6 +55,10 @@
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", "") == "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)",
),
]


Loading
Oops, something went wrong.