-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Jax Sparse
Matrix Example in Documentation Throws Error
#75
Comments
Hi @mabilton |
Hey @mfinzi. Completely agree that it makes sense to push through the refactorisations in #42 before tackling this - let me know if there's anyway I can help out with #42 :) . In the mean time, do you think it would make sense to remove the |
Yes, good point. I will remove that tick. We just finished up #42 and should be able to return to this now |
Hi all, I'm here doing some house keeping. Thanks for pointing this bug out. I've just made a PR #98 that fixed the JAX |
🐛 Bug
One of the Jax sparse matrix examples in the documentation (namely https://cola.readthedocs.io/en/latest/package/cola.ops.html#cola.ops.Sparse) throws an error.
To reproduce
** Code snippet to reproduce **
** Stack trace/error message **
Expected Behavior
That a
Sparse
matrix is returned.System information
cola
version:0.0.4
jax
version:0.4.14
Pop!_OS 22.04 LTS
Additional context
First I'd like to say that I think the idea behind the library is really cool and that I can definitely see myself utilising it across a lot of my projects :).
The fix itself should be as simple defining
sparse_csr
inside ofcola.backends.jax_fns
(plus adding a unit test, which should probably also be done for any other examples in the documentation which are also lacking unit tests), which I'm happy to do over the next couple of days.As an aside, does
cola
intend on supporting sparsity formats other than CSR? I know that bothjax
andpytorch
support COO, CSR, CSC, BSR, and BSC formats (see https://jax.readthedocs.io/en/latest/jax.experimental.sparse.html#other-sparse-data-structures and https://pytorch.org/docs/stable/sparse.html), so I imagine it would make sense to allow users to explicitly specify which sparsity representation they want. Any thoughts on this?Thanks for any help.
Cheers,
Matt.
The text was updated successfully, but these errors were encountered: