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

new JAX solver based on IDAKLU for parameter inference #2282

Closed
martinjrobins opened this issue Sep 7, 2022 · 1 comment · Fixed by #3658
Closed

new JAX solver based on IDAKLU for parameter inference #2282

martinjrobins opened this issue Sep 7, 2022 · 1 comment · Fixed by #3658
Assignees
Labels
difficulty: hard Will take several weeks feature priority: low No existing plans to resolve

Comments

@martinjrobins
Copy link
Contributor

Description

The existing pybamm JAX solver is useful for incorporation into ML libraries for parameter estimation, but it is not as fast or stable as the casadi or idaklu solvers.

This issue proposes writting a C++ JAX wrapper around the new IDAKLU solver so that this solver can also be used, see https://dfm.io/posts/extending-jax/

This allows for a powerful solver to be incorporated into libraries such as Tensorflow (probability) for parameter inference (@brosaplanella).

Note the existing problem that jax does not support sparse matrices. However, the problem can be posed with the jacobian implicit, but defining a jacobian action function (J * a), which can then be passed to the idaklu solver and used.

Motivation

No response

Possible Implementation

No response

Additional context

No response

@martinjrobins
Copy link
Contributor Author

actually, you could keep pybamm.convert_to_format = 'casadi', and so the individual functions are still called by casadi, so you can still use a sparse explicit jacobian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: hard Will take several weeks feature priority: low No existing plans to resolve
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants