-
Notifications
You must be signed in to change notification settings - Fork 23
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
Help debugging solver failure #82
Comments
Hmm. I agree, I also don't understand this. Note that the trigger condition for the error is
... otherwise known as Can you reduce this to a MWE? (Possibly even one that uses just Lineax, without Diffrax or Optimistix.) FWIW, technical side note: the matrix you're seeing there is not technically the input matrix; it is the LU decomposition of that ( |
Hmm, after some digging it looks like After all, the matrix in questions is indeed singular, so this issue doesn't appear to be a problem with |
Got it! Any MWEs you're able to put together, let me know. |
I think part of the issue is that I am still figuring out how to optimally debug code in jax. Both patrick-kidger/optimistix#43 and jax-ml/jax#16732 don't make this easier. One thing that would be helpful is have a debugging option to save inputs to high level functions such as diffeqsolve/rootfind/linear solves to disk to be able to isolate the issue. I have tried implementing this using Overall, my impression is that there is some weird bug in backpropagation with equinox/lineax/optimistix/diffrax that is only present when using |
Makes sense! Off the top of my head I don't know of anything else that really does transforms like JAX -- compiler optimisation passes are probably the closest reference point I have -- so how to best combine transforms with a debugger + navigating stack traces + etc., is something I think that I don't yet have a great answer for. I think you might be one of the first to explore the more difficult parts of that experience. On High-level documentation on backprop in Diffrax: I think the only thing worth mentioning on top of that is |
I am calling
lineax
(version 0.0.4) as part ofdiffrax.diffeqsolve
withKvaerno5
solver using default options. This produces the following error message:I am trying to debug this using
export EQX_ON_ERROR=breakpoint; export EQX_ON_ERROR_BREAKPOINT_FRAMES=6
which suggests that the failure happens during backpropagation. However, after inspecting all the variables I am struggling to understand what the actual problem is:Assuming
array([[-1.72331707, -0.07344511],[ 0. , -5.12813112]])
is the matrix defining the system of linear equations, there shouldn't be any issue with the conditioning of the matrix, or the inputs/outputs. The solver appears to be an LU solver, for which the linear operator appears to satisfy all expected properties. Any pointers on how I could figure out what's going on?The text was updated successfully, but these errors were encountered: