Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR integrates JAX-based FINUFFT operators into the project, updates tests to cover them, and adjusts installation and CI settings.
- Introduce
nifty_solve/jax_operators.pywith JAX operator implementations. - Add comprehensive unit tests for the new JAX operators in
tests/test_jax_operators.pyand update existing tests to use tolerance parameters. - Update installation instructions in
README.mdand modify the CI workflow to install JAX extras.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_operators.py | Added DOTTEST_KWDS and applied to dottest calls |
| tests/test_jax_operators.py | New JAX operator tests covering 1D/2D/3D and edge cases |
| src/nifty_solve/jax_operators.py | Wrapped JAX FINUFFT calls and adjusted vector operations |
| README.md | Documented nifty-solve[jax] extra and install steps |
| .github/workflows/ci.yml | Updated CI matrix and commented out the test-run step |
Comments suppressed due to low confidence (4)
src/nifty_solve/jax_operators.py:8
- The module calls
warnings.warnin the import error block but never imports thewarningsmodule. Please addimport warningsat the top.
try: # pragma: no cover
.github/workflows/ci.yml:44
- The
Run testsstep is commented out, so no tests actually run in CI. Please uncomment these lines to ensure tests are executed.
#- name: "Run tests"
tests/test_jax_operators.py:348
- This test name is duplicated earlier at line 345, which will override the first definition. Rename or remove one of them to avoid silent test collisions.
test_3d_real_operator_dottest_N_even_gt_P_oee = partial(dottest_3d_real_operator, 27, (11, 10, 8))
tests/test_jax_operators.py:218
- [nitpick] There are hundreds of nearly identical
partial-based tests. Consider usingpytest.mark.parametrizeto reduce duplication and improve readability.
# 1D Operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces JAX operators thanks to @TomHilder.
uv add nifty-solve[jax]