-
Notifications
You must be signed in to change notification settings - Fork 26
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
Utility functions for initializing coils for stage 2 optimization #1361
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1361 +/- ##
==========================================
- Coverage 95.69% 95.69% -0.01%
==========================================
Files 101 101
Lines 25569 25601 +32
==========================================
+ Hits 24468 24498 +30
- Misses 1101 1103 +2
|
| benchmark_name | dt(%) | dt(s) | t_new(s) | t_old(s) |
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
test_build_transform_fft_lowres | -0.82 +/- 4.56 | -4.52e-03 +/- 2.52e-02 | 5.47e-01 +/- 2.4e-02 | 5.52e-01 +/- 8.7e-03 |
test_equilibrium_init_medres | -1.06 +/- 4.65 | -4.60e-02 +/- 2.02e-01 | 4.29e+00 +/- 6.0e-02 | 4.33e+00 +/- 1.9e-01 |
test_equilibrium_init_highres | +2.85 +/- 1.30 | +1.55e-01 +/- 7.09e-02 | 5.59e+00 +/- 4.0e-02 | 5.44e+00 +/- 5.9e-02 |
test_objective_compile_dshape_current | +1.06 +/- 1.51 | +4.18e-02 +/- 5.93e-02 | 3.98e+00 +/- 4.6e-02 | 3.94e+00 +/- 3.7e-02 |
test_objective_compute_dshape_current | +1.53 +/- 2.30 | +7.97e-05 +/- 1.19e-04 | 5.28e-03 +/- 7.2e-05 | 5.20e-03 +/- 9.6e-05 |
test_objective_jac_dshape_current | +1.83 +/- 6.79 | +7.84e-04 +/- 2.92e-03 | 4.37e-02 +/- 2.6e-03 | 4.29e-02 +/- 1.3e-03 |
test_perturb_2 | +2.48 +/- 2.66 | +4.88e-01 +/- 5.23e-01 | 2.02e+01 +/- 4.3e-01 | 1.97e+01 +/- 3.0e-01 |
test_proximal_freeb_jac | +0.50 +/- 1.35 | +3.73e-02 +/- 1.01e-01 | 7.47e+00 +/- 9.5e-02 | 7.44e+00 +/- 3.4e-02 |
test_solve_fixed_iter | +1.44 +/- 1.84 | +4.66e-01 +/- 5.93e-01 | 3.27e+01 +/- 4.9e-01 | 3.23e+01 +/- 3.4e-01 |
test_LinearConstraintProjection_build | +1.77 +/- 3.30 | +1.84e-01 +/- 3.43e-01 | 1.06e+01 +/- 2.1e-01 | 1.04e+01 +/- 2.7e-01 |
test_build_transform_fft_midres | +3.19 +/- 5.09 | +1.87e-02 +/- 2.99e-02 | 6.05e-01 +/- 2.6e-02 | 5.87e-01 +/- 1.5e-02 |
test_build_transform_fft_highres | +4.77 +/- 4.11 | +4.47e-02 +/- 3.85e-02 | 9.82e-01 +/- 3.0e-02 | 9.37e-01 +/- 2.4e-02 |
test_equilibrium_init_lowres | +6.75 +/- 4.35 | +2.49e-01 +/- 1.60e-01 | 3.93e+00 +/- 1.6e-01 | 3.68e+00 +/- 3.2e-02 |
test_objective_compile_atf | +3.62 +/- 2.28 | +2.83e-01 +/- 1.79e-01 | 8.11e+00 +/- 6.7e-02 | 7.82e+00 +/- 1.7e-01 |
test_objective_compute_atf | +8.62 +/- 3.14 | +1.29e-03 +/- 4.69e-04 | 1.62e-02 +/- 3.7e-04 | 1.49e-02 +/- 2.9e-04 |
test_objective_jac_atf | +5.24 +/- 3.61 | +9.92e-02 +/- 6.82e-02 | 1.99e+00 +/- 3.9e-02 | 1.89e+00 +/- 5.6e-02 |
test_perturb_1 | +3.60 +/- 3.06 | +5.16e-01 +/- 4.39e-01 | 1.49e+01 +/- 4.3e-01 | 1.43e+01 +/- 8.6e-02 |
test_proximal_jac_atf | +0.61 +/- 1.14 | +5.03e-02 +/- 9.37e-02 | 8.29e+00 +/- 7.6e-02 | 8.24e+00 +/- 5.5e-02 |
test_proximal_freeb_compute | +5.20 +/- 3.48 | +9.87e-03 +/- 6.61e-03 | 2.00e-01 +/- 2.8e-03 | 1.90e-01 +/- 6.0e-03 |
test_solve_fixed_iter_compiled | +3.98 +/- 2.37 | +7.77e-01 +/- 4.62e-01 | 2.03e+01 +/- 4.3e-01 | 1.95e+01 +/- 1.7e-01 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some of the outer saddle coils are linking the modular coils for the finite beta example
Co-authored-by: Dario Panici <[email protected]>
Can someone try running the updated notebook locally? The test is failing but everything seems fine locally for me. |
I also ran locally with no issues. Maybe a memory issue with the CI runner, related to the linking number objective? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged the notebook with master, it should be good now
Did you also re-run it? Or just merge the old version? I don't think the previous one included all the recent changes |
@dpanici rerun this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rerun notebook
Updates all the notebooks with new stopping criteria and new example equilibria (and misc other changes since they were last ran forever ago). No significant changes, just some small numerical differences in a few places. - coil optimization tutorial will be redone in #1361 Resolves #1423 Resolves #1468
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two functions have been added to desc.coils
(initialize_modular_coils
and initialize_saddle_coils
), and their tests have been written. I couldn't find any spelling errors in docs/docstrings. I don't fully understand what's happening inside the functions, but their tests seem reliable to me, and they pass. I think's this PR is good to go.
Resolves #1182
Resolves #1183