Some scikit-learn estimators no longer work with array_function enabled
- Dominant language
- Python
- Stars
- 951
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
There's nothing dask-ml can do I think. Just filing this here till I can figure out the right thing to do.
```python
In [1]: import dask.array as da
In [2]: import dask_ml.datasets
In [3]: X, y = dask_ml.datasets.make_classification(chunks=50)
In [4]: import sklearn.linear_model
In [5]: clf = sklearn.linear_model.LogisticRegression()
In [6]: clf.fit(X, y)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
----> 1 clf.fit(X, y)
~/Envs/dask-dev/lib/python3.7/site-packages/sklearn/linear_model/logistic.py in fit(self, X, y, sample_weight)
1536
1537 multi_class = _check_multi_class(self.multi_class, solver,
-> 1538 len(self.classes_))
1539
1540 if solver == 'liblinear':
TypeError: 'float' object cannot be interpreted as an integer
```
Previously, that would have been converted to an ndarray by scikit-learn and fitted.
Contributor guide
Research direction
Reproduce the failure using the Python session shown in the issue, starting with dask_ml.datasets.make_classification and sklearn.linear_model.LogisticRegression.fit. Inspect the array_function compatibility boundary to determine whether dask-ml or scikit-learn owns the behavior; the issue does not yet define an agreed fix or test for done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100