Safe-DS / Library

A user-friendly library for Data Science in Python.
https://library.safeds.com
MIT License
17 stars 4 forks source link

build: use numpy<2.0.0 #899

Closed Marsmaennchen221 closed 2 months ago

Marsmaennchen221 commented 2 months ago

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)

github-actions[bot] commented 2 months ago

🦙 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_

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.73%. Comparing base (254617c) to head (af4174f).

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lars-reimann commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

torchvision does not specify any restrictions on the numpy version

😠

lars-reimann commented 2 months ago

:tada: This PR is included in version 0.27.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: