Skip to content

Comments

ESS scaling for the OmnigenousField class#2089

Open
ddudt wants to merge 6 commits intomasterfrom
dd/omnigenity_ess
Open

ESS scaling for the OmnigenousField class#2089
ddudt wants to merge 6 commits intomasterfrom
dd/omnigenity_ess

Conversation

@ddudt
Copy link
Collaborator

@ddudt ddudt commented Feb 17, 2026

Adds the method OmnigenousField._get_ess_scale. This was omitted in #1736.

@ddudt ddudt self-assigned this Feb 17, 2026
@ddudt ddudt added the easy Short and simple to code or review label Feb 17, 2026
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The only change to this notebook was adding x_scale='ess' in the optimization.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    2.48 %    |     3.929e+03      |     4.027e+03      |    97.38     |       39.98        |       37.57        |
  test_proximal_jac_w7x_with_eq_update   |    1.39 %    |     6.441e+03      |     6.530e+03      |    89.36     |       165.02       |       164.60       |
  test_proximal_freeb_jac                |    0.11 %    |     1.315e+04      |     1.316e+04      |    14.21     |       86.24        |       85.46        |
  test_proximal_freeb_jac_blocked        |   -0.79 %    |     7.524e+03      |     7.465e+03      |    -59.13    |       75.11        |       74.11        |
  test_proximal_freeb_jac_batched        |    0.35 %    |     7.451e+03      |     7.477e+03      |    26.18     |       76.83        |       73.91        |
  test_proximal_jac_ripple               |   -1.29 %    |     3.535e+03      |     3.489e+03      |    -45.57    |       67.02        |       66.90        |
  test_proximal_jac_ripple_bounce1d      |    1.71 %    |     3.517e+03      |     3.578e+03      |    60.32     |       78.06        |       79.89        |
  test_eq_solve                          |   -0.85 %    |     2.016e+03      |     1.999e+03      |    -17.22    |       95.00        |       95.48        |

For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.52%. Comparing base (29c7877) to head (c437b44).

Files with missing lines Patch % Lines
desc/magnetic_fields/_core.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2089      +/-   ##
==========================================
- Coverage   94.52%   94.52%   -0.01%     
==========================================
  Files         102      102              
  Lines       28785    28791       +6     
==========================================
+ Hits        27210    27214       +4     
- Misses       1575     1577       +2     
Files with missing lines Coverage Δ
desc/magnetic_fields/_core.py 96.06% <16.66%> (-0.56%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ddudt ddudt marked this pull request as ready for review February 18, 2026 17:43
@ddudt ddudt requested review from a team, YigitElma, dpanici, f0uriest, rahulgaur104 and unalmis and removed request for a team February 18, 2026 17:44
@YigitElma
Copy link
Collaborator

YigitElma commented Feb 18, 2026

ReviewNB

For some reason, it doesn't show my comments.

Is it normal to have such a big change in the initial trust radius? From 6.247e-02 to 6.410e-09. Because of this change, the optimization seems to start slowly, then increases the trust radius and becomes faster.

@ddudt
Copy link
Collaborator Author

ddudt commented Feb 19, 2026

ReviewNB

For some reason, it doesn't show my comments.

Is it normal to have such a big change in the initial trust radius? From 6.247e-02 to 6.410e-09. Because of this change, the optimization seems to start slowly, then increases the trust radius and becomes faster.

Interesting, I didn't realize that x_scale changes the initial_trust_radius since they are both related to the Jacobian scaling. I edited the notebook to use the "scipy" radius which is larger than the default "conngould" radius, but it still converges to the same result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy Short and simple to code or review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants