[BUG] Non-linear SVC and SVR are incompatible with dask-ml GridsearchCV #4192
Labels
? - Needs Triage
Need team to review and classify
bug
Something isn't working
Cython / Python
Cython or Python issue
Dask / cuml.dask
Issue/PR related to Python level dask or cuml.dask features.
Referencing the
coef_
attribute on SVC and SVR throws a generic RuntimeError rather than an AttributeError for non-linear kernels. This breaks dask-ML's GridsearchCV (and potentially other components), as it relies on explicit error catching in conditional logic: https://github.com/dask/dask-ml/blob/f1933bbd344452d8cec900ca902da4e417e1683e/dask_ml/model_selection/_normalize.py#L37-L40Note that this still breaks even if the parameter dict passed to dask-ml only specifies the linear kernel. As the default kernel is rbf, you'd need to also explicitly specify this in the estimator passed to GridsearchCV.
If possible, we should try to throw the more specific AttributeError in this scenario.
Dask-ML Failing Example (the error is propagated up rather than caught):
The text was updated successfully, but these errors were encountered: