|
10 | 10 | import pytest
|
11 | 11 | from hypothesis import given, note, settings, strategies
|
12 | 12 | from hypothesis._settings import duration
|
| 13 | +from packaging.version import parse as parse_version |
13 | 14 |
|
14 | 15 | import xgboost as xgb
|
15 | 16 | from xgboost import testing as tm
|
|
44 | 45 | try:
|
45 | 46 | import cudf
|
46 | 47 | import dask.dataframe as dd
|
| 48 | + from dask import __version__ as dask_version |
47 | 49 | from dask import array as da
|
48 | 50 | from dask.distributed import Client
|
49 | 51 | from dask_cuda import LocalCUDACluster
|
50 | 52 |
|
51 | 53 | from xgboost import dask as dxgb
|
52 | 54 | from xgboost.testing.dask import check_init_estimation, check_uneven_nan
|
53 | 55 | except ImportError:
|
54 |
| - pass |
| 56 | + dask_version = None |
| 57 | + |
| 58 | + |
| 59 | +dask_version_ge110 = dask_version and parse_version(dask_version) >= parse_version( |
| 60 | + "2024.11.0" |
| 61 | +) |
55 | 62 |
|
56 | 63 |
|
57 | 64 | def run_with_dask_dataframe(DMatrixT: Type, client: Client) -> None:
|
@@ -375,6 +382,9 @@ def test_early_stopping(self, local_cuda_client: Client) -> None:
|
375 | 382 | dump = booster.get_dump(dump_format="json")
|
376 | 383 | assert len(dump) - booster.best_iteration == early_stopping_rounds + 1
|
377 | 384 |
|
| 385 | + @pytest.mark.xfail( |
| 386 | + dask_version_ge110, reason="Test cannot pass with Dask 2024.11.0+" |
| 387 | + ) |
378 | 388 | @pytest.mark.skipif(**tm.no_cudf())
|
379 | 389 | @pytest.mark.parametrize("model", ["boosting"])
|
380 | 390 | def test_dask_classifier(self, model: str, local_cuda_client: Client) -> None:
|
|
0 commit comments