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

Unpin numpy #452

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Unpin numpy #452

merged 3 commits into from
Aug 21, 2024

Conversation

IgorTatarnikov
Copy link
Member

@IgorTatarnikov IgorTatarnikov commented Aug 19, 2024

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
Previously, keras was incompatible with numpy>=2.0. This is solved by keras-team/keras#20049.

What does this PR do?
Unpins numpy and pins keras>=3.5.0 to ensure numpy>=2.0 compatibility.

References

#446 (nearly closes but the numpy<2.0 pin remains for Windows)

How has this PR been tested?

All tests pass in a fresh environment with numpy==2.0.1 and keras==3.5.0.
Manual testing by starting training via the napari GUI.

Is this a breaking change?

No

Does this PR require an update to the documentation?

No

Checklist:

  • The code has been tested locally
  • The code has been formatted with pre-commit

@IgorTatarnikov IgorTatarnikov marked this pull request as draft August 19, 2024 10:43
@IgorTatarnikov
Copy link
Member Author

Seems there's an issue with MacOS will test further

@IgorTatarnikov
Copy link
Member Author

Seems torch is no longer supporting x86 MacOS as of 2.3.0. I think this is leading to some incompatibility with numpy 2.0.

If torch is no longer supporting x86 macOS then I guess we aren't either? Especially if both the detection and classification are relying on torch. In that case we should drop the macos-13 tests from the matrix. Thoughts? @adamltyson @alessandrofelder

@adamltyson
Copy link
Member

It's not ideal, as there are some intel macs floating out there, but I think dropping it is the right solution because:

  • Not sure we have much of a choice
  • I'd be surprised if these machines are being used for intensive analysis (although I suppose some labs might have mac pros?)

@IgorTatarnikov
Copy link
Member Author

I was able to add a some conditional dependencies to allow us to keep testing against macOS x86.

This also uncovered that the windows build of torch==2.4.0 was not compiled against numpy 2.0 😞. They're aware of this issue and it will be fixed in 2.4.1, for now I've pinned numpy<2.0 just for windows. We can also wait for torch 2.4.1, the final changes are being compiled until 8/26 at which point they'll test and release (not sure how long the after 8/26 part will take!)

@IgorTatarnikov IgorTatarnikov marked this pull request as ready for review August 21, 2024 08:51
@IgorTatarnikov IgorTatarnikov requested a review from a team August 21, 2024 14:26
@IgorTatarnikov
Copy link
Member Author

I'll make a separate PR removing macos-13 from our test suite

@adamltyson adamltyson merged commit b39e641 into main Aug 21, 2024
17 of 18 checks passed
@adamltyson adamltyson deleted the numpy-2 branch August 21, 2024 15:35
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.

2 participants