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

sahi v0.11.18 #58

Merged
merged 7 commits into from
Jul 24, 2024
Merged

Conversation

regro-cf-autotick-bot
Copy link
Contributor

@regro-cf-autotick-bot regro-cf-autotick-bot commented Jul 10, 2024

It is very likely that the current package version for this feedstock is out of date.

Checklist before merging this PR:

  • Dependencies have been updated if changed: see upstream
  • Tests have passed
  • Updated license if changed and license_file is packaged

Information about this PR:

  1. Feel free to push to the bot's branch to update this PR if needed.
  2. The bot will almost always only open one PR per version.
  3. The bot will stop issuing PRs if more than 3 version bump PRs generated by the bot are open. If you don't want to package a particular version please close the PR.
  4. If you want these PRs to be merged automatically, make an issue with @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.
  5. If this PR was opened in error or needs to be updated please add the 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 the conda-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.

Name Upstream Version Current Version
pytorch-cpu 130418 Anaconda-Server Badge

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 your conda-forge.yml. If you encounter issues with this feature please ping the bot team conda-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:

  • python >=3.7
  • opencv <=4.9.0.80
  • python >=3.7
  • numpy <2.0.0

Packages found in the meta.yaml but not found by grayskull:

  • python >=3.6
  • py-opencv <=4.9
  • python >=3.6
  • pytorch

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.

@conda-forge-webservices
Copy link

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 (recipe) and found it was in an excellent condition.

@@ -22,6 +22,8 @@ requirements:
- pip
- python >=3.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- python >=3.6
- python >=3.7

Copy link
Member

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?

Copy link
Contributor

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 🙏🏻

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, reverted in 0a30942.

recipe/meta.yaml Outdated Show resolved Hide resolved
@fcakyon
Copy link
Contributor

fcakyon commented Jul 10, 2024

WDYT @weiji14? 🤔

recipe/meta.yaml Outdated
run:
- py-opencv <=4.9
- numpy <2.0.0
Copy link
Member

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 🙂

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Member

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.

Copy link
Member

@weiji14 weiji14 Jul 11, 2024

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):

Suggested change
- 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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@weiji14 weiji14 left a 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.

@weiji14 weiji14 merged commit 173144a into conda-forge:main Jul 24, 2024
3 checks passed
@regro-cf-autotick-bot regro-cf-autotick-bot deleted the 0.11.18_h60f530 branch July 24, 2024 03:57
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.

3 participants