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

Utility functions for initializing coils for stage 2 optimization #1361

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

f0uriest
Copy link
Member

Resolves #1182
Resolves #1183

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.61%. Comparing base (34dbac0) to head (c06b995).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1361   +/-   ##
=======================================
  Coverage   95.60%   95.61%           
=======================================
  Files          98       98           
  Lines       25417    25450   +33     
=======================================
+ Hits        24300    24334   +34     
+ Misses       1117     1116    -1     
Files with missing lines Coverage Δ
desc/coils.py 98.07% <100.00%> (+0.09%) ⬆️

... and 1 file with indirect coverage changes

Copy link
Contributor

github-actions bot commented Nov 13, 2024

|             benchmark_name             |         dt(%)          |         dt(s)          |        t_new(s)        |        t_old(s)        | 
| -------------------------------------- | ---------------------- | ---------------------- | ---------------------- | ---------------------- |
 test_build_transform_fft_lowres         |     -6.16 +/- 5.89     | -3.57e-02 +/- 3.42e-02 |  5.44e-01 +/- 3.1e-02  |  5.80e-01 +/- 1.4e-02  |
+test_equilibrium_init_medres            |    -10.18 +/- 2.59     | -4.68e-01 +/- 1.19e-01 |  4.13e+00 +/- 1.0e-01  |  4.60e+00 +/- 6.1e-02  |
 test_equilibrium_init_highres           |     -6.64 +/- 2.78     | -3.85e-01 +/- 1.61e-01 |  5.42e+00 +/- 1.4e-01  |  5.80e+00 +/- 8.8e-02  |
 test_objective_compile_dshape_current   |     +0.37 +/- 2.01     | +1.44e-02 +/- 7.90e-02 |  3.95e+00 +/- 6.0e-02  |  3.94e+00 +/- 5.1e-02  |
 test_objective_compute_dshape_current   |     +5.30 +/- 4.27     | +2.71e-04 +/- 2.19e-04 |  5.40e-03 +/- 2.1e-04  |  5.13e-03 +/- 5.9e-05  |
 test_objective_jac_dshape_current       |     +3.52 +/- 6.10     | +1.48e-03 +/- 2.57e-03 |  4.36e-02 +/- 1.1e-03  |  4.22e-02 +/- 2.3e-03  |
 test_perturb_2                          |     +2.77 +/- 2.14     | +5.49e-01 +/- 4.24e-01 |  2.03e+01 +/- 2.9e-01  |  1.98e+01 +/- 3.1e-01  |
 test_proximal_freeb_jac                 |     -0.34 +/- 2.24     | -2.54e-02 +/- 1.66e-01 |  7.40e+00 +/- 7.2e-02  |  7.42e+00 +/- 1.5e-01  |
 test_solve_fixed_iter                   |     +0.33 +/- 1.91     | +1.06e-01 +/- 6.23e-01 |  3.26e+01 +/- 4.3e-01  |  3.25e+01 +/- 4.5e-01  |
 test_LinearConstraintProjection_build   |     -0.48 +/- 3.87     | -5.24e-02 +/- 4.21e-01 |  1.08e+01 +/- 3.7e-01  |  1.09e+01 +/- 2.0e-01  |
 test_build_transform_fft_midres         |     -0.22 +/- 2.79     | -1.33e-03 +/- 1.70e-02 |  6.07e-01 +/- 1.4e-02  |  6.08e-01 +/- 9.0e-03  |
 test_build_transform_fft_highres        |     -1.20 +/- 1.24     | -1.17e-02 +/- 1.22e-02 |  9.67e-01 +/- 5.8e-03  |  9.78e-01 +/- 1.1e-02  |
 test_equilibrium_init_lowres            |     -0.38 +/- 1.63     | -1.48e-02 +/- 6.28e-02 |  3.84e+00 +/- 2.4e-02  |  3.85e+00 +/- 5.8e-02  |
 test_objective_compile_atf              |     +0.34 +/- 1.12     | +2.73e-02 +/- 9.07e-02 |  8.14e+00 +/- 7.1e-02  |  8.11e+00 +/- 5.6e-02  |
 test_objective_compute_atf              |     +3.50 +/- 4.28     | +5.55e-04 +/- 6.79e-04 |  1.64e-02 +/- 6.1e-04  |  1.59e-02 +/- 3.0e-04  |
 test_objective_jac_atf                  |     -2.26 +/- 2.47     | -4.49e-02 +/- 4.89e-02 |  1.94e+00 +/- 4.1e-02  |  1.98e+00 +/- 2.7e-02  |
 test_perturb_1                          |     -0.55 +/- 1.13     | -8.19e-02 +/- 1.67e-01 |  1.47e+01 +/- 1.4e-01  |  1.48e+01 +/- 9.3e-02  |
 test_proximal_jac_atf                   |     -0.12 +/- 1.26     | -1.00e-02 +/- 1.04e-01 |  8.24e+00 +/- 8.0e-02  |  8.25e+00 +/- 6.6e-02  |
 test_proximal_freeb_compute             |     -0.75 +/- 0.87     | -1.50e-03 +/- 1.75e-03 |  1.99e-01 +/- 1.1e-03  |  2.00e-01 +/- 1.4e-03  |
 test_solve_fixed_iter_compiled          |     +0.07 +/- 0.56     | +1.37e-02 +/- 1.15e-01 |  2.05e+01 +/- 9.9e-02  |  2.05e+01 +/- 5.9e-02  |

@f0uriest f0uriest requested review from a team, rahulgaur104, ddudt, dpanici, kianorr, sinaatalay, unalmis and YigitElma and removed request for a team November 13, 2024 02:59
Copy link
Collaborator

@dpanici dpanici left a 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

desc/coils.py Outdated Show resolved Hide resolved
desc/coils.py Show resolved Hide resolved
desc/coils.py Show resolved Hide resolved
@f0uriest f0uriest requested a review from dpanici November 14, 2024 00:47
@f0uriest
Copy link
Member Author

Can someone try running the updated notebook locally? The test is failing but everything seems fine locally for me.

@dpanici
Copy link
Collaborator

dpanici commented Nov 15, 2024

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?

@dpanici
Copy link
Collaborator

dpanici commented Nov 25, 2024

This should be either combined or ahead/behind #1342 as they modify the same notebook. I would be fine to just make those changes into this PR and close the other one tbh to avoid the notebook merge conflict headaches

…s differ due to changed quad flux area weighting
@dpanici
Copy link
Collaborator

dpanici commented Nov 25, 2024

I don't understand why for this PR tests fails due to too large of a diff, but for #1342 the tests are able to run?

@dpanici
Copy link
Collaborator

dpanici commented Dec 3, 2024

I don't understand why for this PR tests fails due to too large of a diff, but for #1342 the tests are able to run?

This seems fixed now? weird

@dpanici
Copy link
Collaborator

dpanici commented Dec 3, 2024

Sorry, forgot I had not meant to merge in #1342 before this one. I can deal with the merge conflict if you want, I think using nbdime would make it easier so I can try that out

Copy link
Collaborator

@dpanici dpanici left a 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

@f0uriest
Copy link
Member Author

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
Copy link
Collaborator

dpanici commented Dec 18, 2024

@dpanici rerun this

Copy link
Collaborator

@dpanici dpanici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rerun notebook

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.

Utility for initializing windowpane coils Utility for initializing modular coils
2 participants