Closed
Description
What happened:
Checking scikit-learn#14687 the code throws the error
Traceback (most recent call last):
File "/home/cmarmo/software/tests/14687-skl.py", line 2, in <module>
import dask_ml.datasets
File "/home/cmarmo/skldevenv/lib64/python3.10/site-packages/dask_ml/__init__.py", line 4, in <module>
from dask_ml.model_selection import _normalize
File "/home/cmarmo/skldevenv/lib64/python3.10/site-packages/dask_ml/model_selection/__init__.py", line 8, in <module>
from ._search import GridSearchCV, RandomizedSearchCV, check_cv, compute_n_splits
File "/home/cmarmo/skldevenv/lib64/python3.10/site-packages/dask_ml/model_selection/_search.py", line 18, in <module>
from sklearn.base import (
ImportError: cannot import name '_is_pairwise' from 'sklearn.base' (/home/cmarmo/software/scikit-learn/sklearn/base.py)
This happens because _is_pairwise
will be removed in scikit-learn 1.1 and should be replaced by _is_pairwise_metric
: I have a pull request ready if welcomed.
What you expected to happen:
No import issues
Minimal Complete Verifiable Example:
# Put your MCVE code here
import dask.array as da
import dask_ml.datasets
import sklearn.linear_model
X, y = dask_ml.datasets.make_classification(chunks=50)
clf = sklearn.linear_model.LogisticRegression()
clf.fit(X, y)
Environment:
- Dask version: 1e811ce
- Python version: Python 3.10.2
- Operating System: Linux 5.16.13-200.fc35.x86_64
- Install method (conda, pip, source): source
- scikit-learn version: scikit-learn/scikit-learn@e5736af
- scikit-learn install method: source
Metadata
Metadata
Assignees
Labels
No labels