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

build: use numpy<2.0.0 #899

Merged
merged 2 commits into from
Jul 12, 2024
Merged

build: use numpy<2.0.0 #899

merged 2 commits into from
Jul 12, 2024

Conversation

Marsmaennchen221
Copy link
Contributor

Summary of Changes

Add clause to pyproject.toml to use a numpy version below 2.0 as torchvision does not yet support numpy 2.0 (See #898)

Copy link
Contributor

github-actions bot commented Jul 11, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ REPOSITORY git_diff yes no 0.38s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.73%. Comparing base (254617c) to head (af4174f).
Report is 34 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #899   +/-   ##
=======================================
  Coverage   97.73%   97.73%           
=======================================
  Files         121      121           
  Lines        6499     6499           
=======================================
  Hits         6352     6352           
  Misses        147      147           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann
Copy link
Member

Why do we need to pin the version of transitive dependencies? Doesn't torchvision declare itself that it needs major version 1 for numpy?

@Marsmaennchen221
Copy link
Contributor Author

Why do we need to pin the version of transitive dependencies? Doesn't torchvision declare itself that it needs major version 1 for numpy?

torchvision does not specify any restrictions on the numpy version and as of pytorch version 2.3.0 pytorch does support numpy v2.0. While torchvision claims to be 98% compatible to Numpy v2.0, a few important methods like read_image or save_image do not support v2.0. So if you install the most recent version of safe-ds you will get numpy 2.0, but a few key methods like Image.from_file will not work.

@lars-reimann
Copy link
Member

torchvision does not specify any restrictions on the numpy version

😠

@lars-reimann lars-reimann merged commit 1cbc147 into main Jul 12, 2024
10 checks passed
@lars-reimann lars-reimann deleted the remove_numpy_2_0 branch July 12, 2024 19:01
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants