-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
sahi v0.11.18 #58
sahi v0.11.18 #58
Conversation
…nda-forge-pinning 2024.07.10.08.41.05
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@@ -22,6 +22,8 @@ requirements: | |||
- pip | |||
- python >=3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- python >=3.6 | |
- python >=3.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The python_requires
is still >3.6
at https://github.com/obss/sahi/blob/0.11.18/setup.py#L36. Any reason to change it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weiji14 You are right, my mistake, we should revert this back. Thank you for noting 🙏🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, reverted in 0a30942.
WDYT @weiji14? 🤔 |
recipe/meta.yaml
Outdated
run: | ||
- py-opencv <=4.9 | ||
- numpy <2.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate on the numpy<2
upper pin here? I saw obss/sahi#1057, but it doesn't mention any errors or what is incompatible.
The issue is that users can still conda install numpy=2
with sahi=0.11.16
or older, since the previous versions did not set this pin. There's a way to prevent that by submitting a repodata-patch to https://github.com/conda-forge/conda-forge-repodata-patches-feedstock, but want to get more context before doing all that work 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are breaking changes in the recently released numpy version that collides with precompiled pytorch binaries. That's why I had to add that constrain @weiji14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check this action run for the error I mention: https://github.com/obss/sahi/actions/runs/9866647136/job/27245723778
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't think it's necessarily an issue on sahi
, but rather on opencv. The error seems to be on the import cv2
line:
Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
...
File "/home/runner/work/sahi/sahi/sahi/__init__.py", line 3, in <module>
from sahi.annotation import BoundingBox, Category, Mask
File "/home/runner/work/sahi/sahi/sahi/annotation.py", line 10, in <module>
from sahi.utils.cv import (
File "/home/runner/work/sahi/sahi/sahi/utils/cv.py", line 10, in <module>
import cv2
AttributeError: _ARRAY_API not found
E..
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
So we need a version of opencv compiled with NumPy 2.0, but that is only available with OpenCV 4.10.0 (opencv/opencv-python#943, conda-forge/opencv-feedstock#417), and sahi uses opencv<=4.9
, hence why numpy 2.0 doesn't work.
In this case, the repodata-patch should probably be applied on opencv instead of sahi. I.e., we could remove the numpy<2.0
pin here, and have the numpy<2.0
be set in https://github.com/conda-forge/opencv-feedstock instead. Give me a few hours to open PRs for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm actually, py-opencv=4.9.0
already has a version constraint for numpy<2.0a0
(set in conda-forge/conda-forge-repodata-patches-feedstock#728, so we could probably just remove the numpy<2.0
pin here and things should work (specifically, sahi
on conda-forge won't be able to install numpy=2.0 because py-opencv=4.8
can't):
- numpy <2.0.0 | |
- numpy |
Of course, the situation for pip install sahi
because PyPI doesn't have repodata-patches, so you'll need to get sahi working with opencv=4.10.0
which supports NumPy 2.0 at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, CI at https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=976316&view=logs&j=656edd35-690f-5c53-9ba3-09c10d0bea97&t=986b1512-c876-5f92-0d81-ba851554a0a3&l=1159 installs numpy=1.26.4
as expected instead of numpy=2.0
, should be all good now!
Constraint should be set on py-opencv already in conda-forge/conda-forge-repodata-patches-feedstock#728, see comment at conda-forge#58 (comment) for context.
Also sorting dependency list alphabetically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge this in @fcakyon if you're happy with it 😄
Edit: I'll just merge this assuming everything is ok.
It is very likely that the current package version for this feedstock is out of date.
Checklist before merging this PR:
license_file
is packagedInformation about this PR:
@conda-forge-admin,
please add bot automerge
in the title and merge the resulting PR. This command will add our bot automerge feature to your feedstock.bot-rerun
label to this PR. The bot will close this PR and schedule another one. If you do not have permissions to add this label, you can use the phrase@conda-forge-admin, please rerun bot
in a PR comment to have theconda-forge-admin
add it for you.Pending Dependency Version Updates
Here is a list of all the pending dependency version updates for this repo. Please double check all dependencies before merging.
Dependency Analysis
Please note that this analysis is highly experimental. The aim here is to make maintenance easier by inspecting the package's dependencies. Importantly this analysis does not support optional dependencies, please double check those before making changes. If you do not want hinting of this kind ever please add
bot: inspection: disabled
to yourconda-forge.yml
. If you encounter issues with this feature please ping the bot teamconda-forge/bot
.Analysis by grayskull shows a discrepancy between it and the the package's stated requirements in the meta.yaml.
Packages found by grayskull but not in the meta.yaml:
Packages found in the meta.yaml but not found by grayskull:
This PR was created by the regro-cf-autotick-bot. The regro-cf-autotick-bot is a service to automatically track the dependency graph, migrate packages, and propose package version updates for conda-forge. Feel free to drop us a line if there are any issues! This PR was generated by - please use this URL for debugging.