You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Steps toward full compatibility with sklearnsklearn.utils.validation.check_array: missing default __array_namespace__ and dpt.isfinite #997
Some work has been started on sklearn to interface estimators that are fully written using only typical array functions with array libraries that implement the Array API, see scikit-learn/scikit-learn#22554
In this effort, the default data validation function sklearn.utils.validation.check_array has been adapted to all array libraries that implement the array API.
For the plugin system we're considering at scikit-learn/scikit-learn#24497 along with our plugin at https://github.com/soda-inria/sklearn-numba-dpex I've found that it could be interesting to re-use sklearn.utils.validation.check_array on usm_ndarray inputs with sklearn validation rules and it might also prevent unnecessary data copies.
I've found that currently a usm_ndarray will fail the check_array for those two reasons:
requires dpctl.tensor.isfinite to be implemented
requires the .__array_namespace__ attribute of usm_ndarray array to return dpctl.tensor rather than None
In the meantime it's possible to work around those two missing features with:
Activity
oleksandr-pavlyk commentedon Aug 16, 2023
Since gh-1324,
dpctl.tensor.usm_ndarray.__array_namespace__returnsdpctl.tensorby default.dpctl.tensor.isfinitehas been implemented for some time as well:oleksandr-pavlyk commentedon Oct 25, 2023
@fcharras Ok to close?
fcharras commentedon Oct 26, 2023
Yes, thank you @oleksandr-pavlyk