DOC: Document lack of support for sparse torch tensors#3186
DOC: Document lack of support for sparse torch tensors#3186david-cortes-intel wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| Sparse arrays | ||
| ~~~~~~~~~~~~~ | ||
|
|
||
| Currently, sparse arrays from libraries other than SciPy (e.g. ``torch.sparse``) are not supported. |
There was a problem hiding this comment.
Are those supported in stock scikit?
I mean, I do not think we should specify in the docs everyting that might be supported, but is not supported for now in sklearnex.
There was a problem hiding this comment.
Their docs do not mention anything about them, but they work in some cases:
scikit-learn/scikit-learn#34087
Technically, sparse classes from pytorch are torch tensors and inherit from the class used by dense tensors, which according to the docs should be supported:
So this PR clarifies that they aren't actually supported.
There was a problem hiding this comment.
Form the conversation in scikit-learn/scikit-learn#34087 I still do not see that it is necessary to add this kind of note on our side.
There was a problem hiding this comment.
But our docs do mention that array API works on torch.Tensor:
.. and sparse tensor technically fall into that category.
Description
From some experiments, it appears that some cases with array API support in scikit-learn work fine with sparse torch arrays, even though these aren't strictly part of array API.
In sklearnex, the table convertors do not have any special handling of sparse torch arrays, so they usually error out. This PR documents the lack of support for them.
Checklist:
Completeness and readability
Testing