Skip to content
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

Failure to raise error for ill-posed system if using LU and 32-bit #108

Open
johannahaffner opened this issue Sep 13, 2024 · 2 comments
Open

Comments

@johannahaffner
Copy link

When using AutoLinearOperator with well_posed=True and no tags specifying some structure, the LU solver is used.

LU wraps the jax.scipy implementation and raises an error if the output has NaN or +/- inf values. However, jsp.linalg.lu_solve will not necessarily return a vector with such values for an ill-posed problem, unless one uses double-precision: jax-ml/jax#23626
If there is no fix in JAX itself, then we could check if the solution is valid and throw an error if it's not.

I am using SVD for that particular problem anyway, but wanted to note this here since AutoLinearSolver promises to raise an error for ill-posed problems.

@patrick-kidger
Copy link
Owner

patrick-kidger commented Sep 19, 2024

For this one I think let's aim to get this fixed upstream in JAX itself. I think it'd be really hard for us to work around this issue here in a reliable way. I'm following the discussion there; let me know if you need any input. :)

@johannahaffner
Copy link
Author

Alright!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants