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

Numpy2.0 #134

Merged
merged 15 commits into from
Jun 24, 2024
Merged

Numpy2.0 #134

merged 15 commits into from
Jun 24, 2024

Conversation

paquiteau
Copy link
Member

Numpy 2.0 got released, some nufft backend are broken, this fixes them in the CI.

Otherwise, non supported backend would failed afterwards.
@paquiteau paquiteau linked an issue Jun 21, 2024 that may be closed by this pull request
7 tasks
Comment on lines +112 to +117
if wrt_data or wrt_traj:
if isinstance(operator, FourierOperatorBase):
operator = operator.make_autograd(wrt_data, wrt_traj)
else:
# instance will be created later
operator = partial(operator.with_autograd, wrt_data, wrt_traj)
Copy link
Member

Choose a reason for hiding this comment

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

Is this related to this PR?

Copy link
Member Author

@paquiteau paquiteau Jun 21, 2024

Choose a reason for hiding this comment

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

no, but this is a fix for something else (that I thought was already merge).

@@ -53,6 +53,7 @@ jobs:
shell: bash
run: |
sudo apt install -y libnfft3-dev
python -m pip install numpy<2.0.0
Copy link
Member

Choose a reason for hiding this comment

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

shouldnt we update in pyproject.toml? Like is it a test issue or lack of compatibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's more complicated than that, some backend requires numpy<2.0, other don't care

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we document the problem in issue and tag it here? That way we know what needs a fix.. Is the pipeline broken currently?

@chaithyagr
Copy link
Member

Turns out we needed another release with numpy>2.0 for pynfft2. I have added required stuff in pyproject.toml, also CI. @paquiteau ready to review and merge when green.

@paquiteau paquiteau merged commit 035e99a into master Jun 24, 2024
8 checks passed
@paquiteau paquiteau deleted the numpy2.0 branch June 24, 2024 14:19
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.

Numpy 2.0 Compatibility
2 participants