Skip to content

Remove static_attrs variables from constants dicts in _omnigenity objectives - #2297

Open
dpanici wants to merge 8 commits into
masterfrom
dp/hotfix-qs-boozer-static
Open

Remove static_attrs variables from constants dicts in _omnigenity objectives#2297
dpanici wants to merge 8 commits into
masterfrom
dp/hotfix-qs-boozer-static

Conversation

@dpanici

@dpanici dpanici commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Resolves #2295

@dpanici
dpanici requested a review from YigitElma August 19, 2026 20:50
@dpanici dpanici changed the title Remove surf_batch_size from constants in QuasisSymmetrBoozer Remove surf_batch_size from constants in _omnigenity objectives Aug 19, 2026
@dpanici dpanici changed the title Remove surf_batch_size from constants in _omnigenity objectives Remove static_attrs variables from constants dicts in _omnigenity objectives Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    0.10 %    |     4.247e+03      |     4.251e+03      |     4.45     |       32.04        |       28.79        |
  test_proximal_jac_w7x_with_eq_update   |   -0.79 %    |     6.873e+03      |     6.819e+03      |    -54.20    |       154.35       |       153.62       |
  test_proximal_freeb_jac                |    0.06 %    |     1.353e+04      |     1.353e+04      |     8.50     |       80.22        |       81.37        |
  test_proximal_freeb_jac_blocked        |    0.30 %    |     7.858e+03      |     7.881e+03      |    23.28     |       68.92        |       69.44        |
  test_proximal_freeb_jac_batched        |   -0.03 %    |     7.881e+03      |     7.879e+03      |    -2.35     |       68.64        |       69.57        |
  test_proximal_jac_ripple               |   -0.52 %    |     3.792e+03      |     3.772e+03      |    -19.75    |       53.46        |       52.88        |
  test_proximal_jac_ripple_bounce1d      |   -1.05 %    |     4.022e+03      |     3.980e+03      |    -42.40    |       69.23        |       66.65        |
  test_eq_solve                          |   -0.58 %    |     1.823e+03      |     1.812e+03      |    -10.55    |       53.85        |       52.62        |
  test_objective_quadratic_flux_jac      |    0.35 %    |     1.885e+03      |     1.892e+03      |     6.67     |       36.42        |       34.89        |

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

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.35%. Comparing base (7168ac7) to head (b548583).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2297      +/-   ##
==========================================
- Coverage   94.35%   94.35%   -0.01%     
==========================================
  Files         101      101              
  Lines       29053    29053              
==========================================
- Hits        27414    27413       -1     
- Misses       1639     1640       +1     
Files with missing lines Coverage Δ
desc/objectives/_omnigenity.py 97.04% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@YigitElma YigitElma left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Minor comment, otherwise looks good.

Comment thread tests/test_examples.py Outdated
obj = QuasisymmetryBoozer(helicity=(1, eq1.NFP), eq=eq1)
obj = QuasisymmetryBoozer(helicity=(1, eq1.NFP), eq=eq1, surf_batch_size=1)
obj.build()
B_asym = obj.compute(*obj.xs(eq1))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If the intent is to test if the static attribute error is fixed here, then I would suggest calling obj.compute_unscaled since plain compute is not jitted and wouldn't recreate the issue.

@YigitElma
YigitElma requested review from a team, IssraAli, ddudt, f0uriest, lkadz, rahulgaur104, singh-jaydeep and unalmis and removed request for a team August 28, 2026 15:43
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.

_static_attr that is stored in _constants throw tracer conversion error

2 participants