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

Expose optimization path of L-BFGS optimizer #10243

Closed
miclegr opened this issue Apr 12, 2022 · 3 comments
Closed

Expose optimization path of L-BFGS optimizer #10243

miclegr opened this issue Apr 12, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@miclegr
Copy link

miclegr commented Apr 12, 2022

Algorithms such as Pathfinder (paper, blackjax-devs/blackjax#157) need as input all the optimization path, and not only the result, of a L-BFGS optimization run.
Differently from R (and consistently with scipy) jax's jax._src.scipy.optimize._lbfgs._minimize_lbfgs does not expose the path, but just the result. A generalization of such fuction that expose the optimization path would look like this and would allow to implement Pathfinder without rewriting a jax internal function and keeping it in sync with jax main branch over time.

Happy to submit a proper pull request if such feature would be considered for merging.

@miclegr miclegr added the enhancement New feature or request label Apr 12, 2022
@froystig froystig self-assigned this Apr 16, 2022
@froystig
Copy link
Member

We are looking to deprecate jax.scipy.minimize and recommend JAXopt instead, so I'd bring @mblondel into this thread (and perhaps eventually we should move the discussion to the jaxopt repository).

@mblondel
Copy link

JAXopt allows you to do this by repeatedly calling solver.update in your own for loop instead of calling solver.run.

@miclegr
Copy link
Author

miclegr commented Apr 19, 2022

Thanks! That solves the problem, appreciated 👍

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

No branches or pull requests

3 participants