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

7 faster optimization for heterodyne likelihood using jax #9

Merged

Conversation

kazewong
Copy link
Owner

Instead of using scipy differential evolution, this is a patch that use more jax-native optimization code.

I tried using jaxopt's optimization routine, but somehow their code always recompile the kernel no matter, including algorithms like bfgs or lbfgs. Furthermore, it is non-trivial to vmap over lbfgs to take advantage over multiple concurrent process available on GPU, so jaxopt was actually not ideal for this purpose.

flowMC now provides a blackbox interface for optimization that uses an evolutionary algorithm to find optimum of a general function, which work quite well with the current APIL. It makes use of vmap quite efficiently, so it can take advantage of many parallel likelihood evaluation we can provide. It also provides a pretty simple interface, so it is easy to incorporate in our workflow.

This patch only show an example on how to use the API in 'GW170817_optimize.py'. We should build this into pipeline in refactoring.

@kazewong kazewong linked an issue May 12, 2023 that may be closed by this pull request
@kazewong kazewong merged commit b37e45b into main May 12, 2023
@kazewong kazewong deleted the 7-faster-optimization-for-heterodyne-likelihood-using-jax branch May 12, 2023 16:01
ThibeauWouters pushed a commit to ThibeauWouters/jim that referenced this pull request Nov 22, 2023
…-heterodyne-likelihood-using-jax

7 faster optimization for heterodyne likelihood using jax
xuyuon added a commit to tsunhopang/jim that referenced this pull request Sep 3, 2024
…pling_improvement

Extrinsic parameter sampling improvement
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

Successfully merging this pull request may close these issues.

Faster optimization for heterodyne likelihood using Jax
1 participant