Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion conda/environments/all_cuda-129_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies:
- rmm==26.2.*,>=0.0.0a0
- scikit-build-core>=0.10.0
- scikit-learn>=1.4
- scikit-learn>=1.4,<1.8.0
- scipy>=1.11.0
- seaborn
- sphinx
Expand Down
1 change: 0 additions & 1 deletion conda/environments/all_cuda-129_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies:
- rmm==26.2.*,>=0.0.0a0
- scikit-build-core>=0.10.0
- scikit-learn>=1.4
- scikit-learn>=1.4,<1.8.0
- scipy>=1.11.0
- seaborn
- sphinx
Expand Down
1 change: 0 additions & 1 deletion conda/environments/all_cuda-130_arch-aarch64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies:
- rmm==26.2.*,>=0.0.0a0
- scikit-build-core>=0.10.0
- scikit-learn>=1.4
- scikit-learn>=1.4,<1.8.0
- scipy>=1.11.0
- seaborn
- sphinx
Expand Down
1 change: 0 additions & 1 deletion conda/environments/all_cuda-130_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ dependencies:
- rmm==26.2.*,>=0.0.0a0
- scikit-build-core>=0.10.0
- scikit-learn>=1.4
- scikit-learn>=1.4,<1.8.0
- scipy>=1.11.0
- seaborn
- sphinx
Expand Down
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ dependencies:
- pytest-cov
- pytest-xdist
- seaborn
- scikit-learn>=1.4,<1.8.0
- *scikit_learn
- statsmodels
- tenacity
- umap-learn==0.5.7
Expand Down
3 changes: 3 additions & 0 deletions python/cuml/cuml_accel_tests/integration/test_hdbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from sklearn.preprocessing import StandardScaler

if Version(sklearn.__version__) >= Version("1.8.0.dev0"):
# NOTE: Remove this skip when issue
# https://github.com/scikit-learn-contrib/hdbscan/issues/689 is resolved,
# as it blocks compatibility with scikit-learn >= 1.8.0.dev0.
pytest.skip(
"hdbscan requires sklearn < 1.8.0.dev0", allow_module_level=True
)
Expand Down
344 changes: 283 additions & 61 deletions python/cuml/cuml_accel_tests/upstream/scikit-learn/xfail-list.yaml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions python/cuml/cuml_accel_tests/upstream/umap/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ set -eu

UMAP_TAG="release-0.5.7"

# Skip tests for scikit-learn >= 1.8 -- umap-learn is not compatible with scikit-learn 1.8 yet
python -c "
import sys
from packaging.version import Version
import sklearn
sys.exit(
int(
Version(sklearn.__version__) >= Version('1.8')
)
)
" || {
echo "Skipping umap tests for scikit-learn >= 1.8"
exit 0
}

THIS_DIRECTORY=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
UMAP_REPO="${THIS_DIRECTORY}/umap-upstream"

Expand Down
2 changes: 1 addition & 1 deletion python/cuml/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ test = [
"pytest-xdist",
"pytest<9.0",
"pyyaml",
"scikit-learn>=1.4,<1.8.0",
"scikit-learn>=1.4",
"seaborn",
"statsmodels",
"tenacity",
Expand Down
5 changes: 5 additions & 0 deletions python/cuml/tests/test_fil.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import numpy as np
import pandas as pd
import pytest
import sklearn
import treelite
from packaging.version import Version

# Import XGBoost before scikit-learn to work around a libgomp bug
# See https://github.com/dmlc/xgboost/issues/7110
Expand Down Expand Up @@ -910,6 +912,9 @@ def test_device_selection(device_id, model_kind, tmp_path):
)
xgb_model.fit(X, y)
model_path = os.path.join(tmp_path, "xgb_class.ubj")
# skip with sklearn version 1.8.0.dev0
if Version(sklearn.__version__) >= Version("1.8.0.dev0"):
pytest.skip("xgboost is incompatible with sklearn >= 1.8.0.dev0")
Comment on lines +915 to +917
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can revert this once dmlc/xgboost#11858 is released.

xgb_model.save_model(model_path)
fm = ForestInference.load(
model_path,
Expand Down
7 changes: 7 additions & 0 deletions python/cuml/tests/test_hdbscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import numpy as np
import pandas as pd
import pytest
import sklearn
from packaging.version import Version
from pylibraft.common import DeviceResourcesSNMG
from sklearn import datasets
from sklearn.datasets import make_blobs
Expand All @@ -23,6 +25,11 @@
from cuml.testing.datasets import make_pattern
from cuml.testing.utils import array_equal

if Version(sklearn.__version__) >= Version("1.8.0.dev0"):
pytest.skip(
"hdbscan requires sklearn < 1.8.0.dev0", allow_module_level=True
)

dataset_names = ["noisy_circles", "noisy_moons", "varied"]


Expand Down
11 changes: 2 additions & 9 deletions python/cuml/tests/test_linear_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,23 +329,20 @@ def test_logistic_regression(
solver="saga",
C=C,
fit_intercept=fit_intercept,
multi_class="auto",
)
else:
sklog = skLog(
penalty=penalty,
solver="saga",
C=C,
fit_intercept=fit_intercept,
multi_class="auto",
)
else:
sklog = skLog(
penalty=penalty,
solver="lbfgs",
C=C,
fit_intercept=fit_intercept,
multi_class="auto",
)

sklog.fit(X_train, y_train)
Expand Down Expand Up @@ -417,7 +414,7 @@ def test_logistic_regression_model_default(dtype):
y_test = y_test.astype(dtype)
culog = cuLog()
culog.fit(X_train, y_train)
sklog = skLog(multi_class="auto")
sklog = skLog()

sklog.fit(X_train, y_train)

Expand Down Expand Up @@ -586,11 +583,7 @@ def test_logistic_regression_predict_proba(

sklog = skLog(
fit_intercept=fit_intercept,
**(
{"solver": "lbfgs", "multi_class": "multinomial"}
if num_classes > 2
else {}
),
**({"solver": "lbfgs"} if num_classes > 2 else {}),
)
sklog.coef_ = culog.coef_
sklog.intercept_ = culog.intercept_ if fit_intercept else 0
Expand Down
6 changes: 6 additions & 0 deletions python/cuml/tests/test_trustworthiness.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import cudf
import numpy as np
import pytest
import sklearn
from packaging.version import Version
from sklearn.datasets import make_blobs
from sklearn.manifold import trustworthiness as sklearn_trustworthiness
from umap import UMAP
Expand All @@ -19,6 +21,10 @@
@pytest.mark.filterwarnings(
"ignore:n_jobs value.*overridden.*by setting random_state.*:UserWarning"
)
@pytest.mark.xfail(
condition=Version(sklearn.__version__) >= Version("1.8.0.dev0"),
reason="umap-learn is incompatible with sklearn >= 1.8.0",
)
def test_trustworthiness(
input_type, n_samples, n_features, n_components, batch_size
):
Expand Down
5 changes: 5 additions & 0 deletions python/cuml/tests/test_umap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import numpy as np
import pytest
import scipy.sparse as scipy_sparse
import sklearn
import umap
from packaging.version import Version
from pylibraft.common import DeviceResourcesSNMG
from sklearn import datasets
from sklearn.cluster import KMeans
Expand All @@ -29,6 +31,9 @@
unit_param,
)

if Version(sklearn.__version__) >= Version("1.8.0.dev0"):
pytest.skip("umap requires sklearn < 1.8.0.dev0", allow_module_level=True)

dataset_names = ["iris", "digits", "wine", "blobs"]


Expand Down