Skip to content

Add fft grid and raz grid to test against master#2157

Merged
ddudt merged 39 commits into
masterfrom
ku/test
May 4, 2026
Merged

Add fft grid and raz grid to test against master#2157
ddudt merged 39 commits into
masterfrom
ku/test

Conversation

@unalmis
Copy link
Copy Markdown
Collaborator

@unalmis unalmis commented Apr 10, 2026

PR Age

  • Adds FFT grids and field aligned grids to test_compute_everything. Should be merged before stuff that changes grids New Grid API #2053 or stuff that changes how the dependencies are ordered/selected for computation Switch compute from recursive to looped #1557 to ensure they do not cause bugs in the computations.
  • Deletes a bunch of files that are now not necessary and removes bounce objective docstring boilerplate
  • uses nondiff_argnums instead of nondiff_argnames so that the code works on old jax versions
  • Adds comments to explain per bounce_comments PR
  • Resolves nufft Error #2162 .

@unalmis unalmis self-assigned this Apr 10, 2026
@unalmis unalmis added easy Short and simple to code or review testing Adding a new test or fixing an existing one skip_changelog No need to update changelog on this PR labels Apr 10, 2026
@unalmis unalmis requested review from daniel-dudt and ddudt April 10, 2026 02:08
Comment thread tests/test_compute_funs.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 10, 2026

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    1.69 %    |     3.937e+03      |     4.003e+03      |    66.48     |       30.63        |       28.41        |
  test_proximal_jac_w7x_with_eq_update   |   -1.35 %    |     6.539e+03      |     6.450e+03      |    -88.55    |       141.31       |       142.22       |
  test_proximal_freeb_jac                |   -0.01 %    |     1.337e+04      |     1.337e+04      |    -1.28     |       85.52        |       82.79        |
  test_proximal_freeb_jac_blocked        |    0.06 %    |     7.681e+03      |     7.686e+03      |     4.64     |       73.47        |       72.87        |
  test_proximal_freeb_jac_batched        |   -0.39 %    |     7.673e+03      |     7.643e+03      |    -29.79    |       72.16        |       72.47        |
  test_proximal_jac_ripple               |   -1.89 %    |     3.593e+03      |     3.525e+03      |    -67.75    |       49.82        |       51.35        |
  test_proximal_jac_ripple_bounce1d      |    0.70 %    |     3.777e+03      |     3.803e+03      |    26.48     |       64.90        |       64.90        |
  test_eq_solve                          |    0.35 %    |     2.081e+03      |     2.088e+03      |     7.23     |       77.48        |       77.06        |

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 92.47312% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.36%. Comparing base (6b3978f) to head (9b9d666).

Files with missing lines Patch % Lines
desc/integrals/_interp_utils.py 44.44% 5 Missing ⚠️
desc/integrals/bounce_integral.py 96.07% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2157      +/-   ##
==========================================
- Coverage   94.37%   94.36%   -0.02%     
==========================================
  Files         101      101              
  Lines       28763    28785      +22     
==========================================
+ Hits        27146    27162      +16     
- Misses       1617     1623       +6     
Files with missing lines Coverage Δ
desc/compute/_fast_ion.py 100.00% <ø> (ø)
desc/compute/_neoclassical.py 100.00% <ø> (ø)
desc/equilibrium/equilibrium.py 96.12% <ø> (ø)
desc/integrals/__init__.py 100.00% <ø> (ø)
desc/integrals/_bounce_utils.py 94.26% <100.00%> (+0.12%) ⬆️
desc/objectives/_fast_ion.py 95.18% <100.00%> (ø)
desc/objectives/_neoclassical.py 95.00% <100.00%> (ø)
desc/objectives/objective_funs.py 94.99% <100.00%> (+<0.01%) ⬆️
desc/integrals/bounce_integral.py 98.05% <96.07%> (+0.07%) ⬆️
desc/integrals/_interp_utils.py 87.05% <44.44%> (-1.36%) ⬇️

... 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.

@unalmis unalmis requested review from a team, YigitElma, dpanici, f0uriest and rahulgaur104 and removed request for a team April 10, 2026 05:55
Comment thread tests/test_compute_everything.py
@unalmis unalmis requested a review from f0uriest April 11, 2026 00:29
@unalmis
Copy link
Copy Markdown
Collaborator Author

unalmis commented Apr 11, 2026

someone else will need to cllick merge when ready

@unalmis
Copy link
Copy Markdown
Collaborator Author

unalmis commented Apr 16, 2026

@unalmis Please do not mark comments as resolved unless they are addressed in the code or the discussion has concluded. Responding is not the same as resolving. Comments are helpful for everyone to read, but when they are resolved it makes them less visible for other reviewers to see and join the conversation.

I can show you how to enable GitHub notifications to see when there are new comments.

You had reopened two which is outside scope of this PR as master already has them. Such discussion should be done in github issues. I think the effort it takes for a reviewer to click see comment button is much less than the increased effort for me, the maintainer, to track which issues are actually resolvable and which are just unactionable due to jax or cosmetic personal preference that should be resolved elsewhere as they don't need my input. Github notifications don't work selectively on a PR. i get notifs for all of desc or none of it.

@unalmis unalmis requested review from ddudt and removed request for ddudt April 17, 2026 00:12
@unalmis
Copy link
Copy Markdown
Collaborator Author

unalmis commented Apr 17, 2026

@ddudt consider https://github.com/pullpo-io/conventional-comments for comprimise

dpanici
dpanici previously approved these changes Apr 19, 2026
Copy link
Copy Markdown
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.

Looks good to me, thanks for taking some of the comments from that PR I had made. I would also like @ddudt to re-review since he had made a lot of comments his first pass around.

If possible, let's merge this one before the sparse pullback PR (#2170 , have not reviewed it yet) gets merged into here, so we can isolate the changes a bit and make the reviews of each more manageable

Comment thread desc/objectives/objective_funs.py
fft_names = ["effective ripple", "Gamma_c", "Gamma_c Velasco"]

eq = get("W7-X")
# ci and my laptop differ a bunch at rho = 0, so skip that
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.

Non-Blocking, just curiosity: I'm fine with skipping the axis if it is sensitive, but out of curiosity what OS are you using?

I find I get minor diffs that still trip the test if I say re-saved quantities I computed on my mac, which then will have slight differences compared to the quantities computed on the CI's linux (I believe) runners. Usually I would just make sure I saved the quantities on some linux (non-wsl though I think I may have had issues there too) os like one of the university clusters.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread desc/integrals/_bounce_utils.py
Comment thread desc/integrals/_interp_utils.py
Comment thread desc/integrals/bounce_integral.py
Comment thread desc/integrals/bounce_integral.py
Comment thread desc/integrals/bounce_integral.py
@unalmis
Copy link
Copy Markdown
Collaborator Author

unalmis commented Apr 29, 2026

i don't have codecov override

@unalmis unalmis requested review from dpanici and f0uriest April 29, 2026 21:49
Copy link
Copy Markdown
Collaborator

@ddudt ddudt left a comment

Choose a reason for hiding this comment

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

thought(non-blocking)

I want to echo this comment from Rory about having smaller PRs, each with a narrow scope. This was a big PR that covered a lot more than it originally advertised. More digestible PRs are easier and faster to review, and will make you a better software developer.

Also I really like this Chrome extension that Kaya recommended and I would recommend it to others!

Comment thread desc/integrals/_bounce_utils.py
@unalmis unalmis mentioned this pull request May 1, 2026
@unalmis
Copy link
Copy Markdown
Collaborator Author

unalmis commented May 2, 2026

i don't have codecov override

need codecov override

@ddudt ddudt merged commit 316cc03 into master May 4, 2026
27 of 28 checks passed
@ddudt ddudt deleted the ku/test branch May 4, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Add documentation or better warnings etc. easy Short and simple to code or review skip_changelog No need to update changelog on this PR stable Besides merging master, other updates require a child PR that should be merged to master later. testing Adding a new test or fixing an existing one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nufft Error

5 participants