Draft: add JAX VMEC/Boozer optimization path#604
Draft: add JAX VMEC/Boozer optimization path#604rogeriojorge wants to merge 19 commits intohiddenSymmetries:masterfrom
Conversation
|
This draft depends on uwplasma/vmec_jax#2. The wrapper-side initialization bug is fixed, but the remaining gap is upstream in the VMEC-JAX equilibrium/lambda-current path rather than in the SIMSOPT API layer. |
|
Thanks for the review. I pushed a follow-up commit that addresses the three concrete blockers:
I also added the missing tracked example updates ( Validation after the follow-up commit:
On the |
There was a problem hiding this comment.
Can we revert changes here? What there a reason to change the resolution?
There was a problem hiding this comment.
By the way if these are good fixes anyways, but unrelated to the jax_vmec stuff, just submit this as a separate, small PR, and we will approve extremely fast.
There was a problem hiding this comment.
Same comment, is there some reason to change this file? Looks like you are doing a more robust, higher res solve, but no vmec or boozer jax functionality here, no?
There was a problem hiding this comment.
This is not very readable. Do we need all the parser arguments here? Can we put this in the source code instead or something?
There was a problem hiding this comment.
Can you clarify what you are doing here? Hard to tell if this is related to the jax booz_xform or this is a different fix?
There was a problem hiding this comment.
Here and other new files, please add detailed docstrings (with cursor) for the new functions.
There was a problem hiding this comment.
Same comment, these functions need a lot of docstrings.
There was a problem hiding this comment.
Filename is very confusing because it conflicts with external jax package! Please change to jax_solve or jax_least_squares_solve or something.
There was a problem hiding this comment.
Why is this change needed?
Summary
vmec_jaxandbooz_xform_jaxBoozerand QH example changes required by the new tests/examplesIncluded changes
VmecJaxandBoozerJaxwrappers undersimsopt.mhdsimsopt.solveQH_fixed_resolution_boozer_jax.pyand focused profiling helpersBoozersupport foruse_wout_fileand MPI-group-safe serial Boozer executionproc0_print(..., flush=True)default and safe VMEC cleanup behavior for missing auxiliary filesDependency
vmec_jaxPR: Draft: improve QH parity diagnostics and wout metadata uwplasma/vmec_jax#2booz_xform_jaxcode PR at the moment because this worktree did not require source changes inbooz_xform_jaxReviewer fixes in latest update
VmecJaxnow derives default solver controls fromNITER_ARRAY/FTOL_ARRAYwhen present, instead of silently falling back to scalarNITER/FTOLwarm_start_iters=0uses the plain VMEC-style initial guessBoozer/ QH example changes are now included in the PR branch, sotest_boozer_jax_compare.pyno longer depends on an uncommitted API extensionMeasured status
1.59e-2to7.30e-31.7644570754324314e-3Validation
pytest -q tests/mhd/test_vmec_jax_wrapper.pypytest -q tests/mhd/test_boozer_jax_compare.pypytest -q tests/mhd/test_vmec_jax_wrapper.py tests/mhd/test_booz_input_parity.py tests/mhd/test_vmec_jax_qh_mismatch_diagnostics.pyReview focus
VmecJax,BoozerJax, and JAX least-squares integrationStatus
This remains a draft PR for early review. The JAX path is functional and several wrapper bugs are fixed, but full parity and runtime targets versus the original VMEC2000/BoozXform workflow are still in progress.