lightly-ai / lightly

A python library for self-supervised learning on images.
https://docs.lightly.ai/self-supervised-learning/
MIT License
3.09k stars 264 forks source link

upgrade requirements/base.txt minimum numpy version to 1.20 for typing #1490

Closed MalteEbner closed 1 month ago

MalteEbner commented 8 months ago

We are using the numpy.typing subpackage, which is only available in numpy >= 1.20: https://numpy.org/devdocs/reference/typing.html#module-numpy.typing

Thus we need to update the minimum requirement.

codecov[bot] commented 8 months ago

Codecov Report

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

Comparison is base (6bd7553) 84.38% compared to head (3f1bc45) 84.38%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1490 +/- ## ======================================= Coverage 84.38% 84.38% ======================================= Files 139 139 Lines 5756 5756 ======================================= Hits 4857 4857 Misses 899 899 ```

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

SauravMaheshkar commented 3 months ago

How does https://github.com/lightly-ai/lightly/pull/1559 affect this ?

guarin commented 2 months ago

@MalteEbner what is the state of this PR?

IMO there are two options:

The current state with numpy>=1.18.1, <2 as default requirement and numpy==1.26.6 as minimal requirement is not ideal.

guarin commented 1 month ago

This has been fixed in https://github.com/lightly-ai/lightly/pull/1625

We still support numpy<1.20 and only import from numpy.typing when type-checking.