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

jpeg <0.0.0a run constrain breaks pillow torchvision compatibility #28

Closed
junpuf opened this issue Jun 6, 2023 · 4 comments
Closed
Labels

Comments

@junpuf
Copy link

junpuf commented Jun 6, 2023

Comment:

Hi @hmaarrfk and all

There is an compatibility issue introduced between libjpeg-turbo 2.1.5.1 (via pillow 9.5.0) and any torchvison version due to the addition of jpeg <0.0.0a run constrain in 6cee832.

May i ask the rational of this breaking change in an update between 2.1.4 build 0 to 2.1.4 build 1?

Also, further investigation found that jpeg <0.0.0a doesn't map to any existing jpeg conda package versions in conda-forge, which means this constrain will eliminate the compatibility between libjpeg-turbo and any other conda package that depend on jpeg.

The following packages are incompatible
├─ pillow 9.5.0**  is installable and it requires
│  └─ libjpeg-turbo >=2.1.5.1,<3.0a0 , which requires
│     └─ jpeg <0.0.0a , which can be installed;
└─ torchvision   is uninstallable because there are no viable options
   ├─ torchvision [0.15.1|0.15.2] would require
   │  └─ jpeg  , which conflicts with any installable versions previously reported;
   └─ torchvision [0.10.0|0.10.1|...|0.9.1] conflicts with any installable versions previously reported.

Reference:

@junpuf junpuf added the question label Jun 6, 2023
@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jun 7, 2023

Please see conda-forge/conda-forge.github.io#673

The last comment is me mostly admitting the difficulty in fixing the problem you are hitting.

My solution has been to

conda uninstall --force --offline --yes jpeg
mamba update --all --yes

generally gets you through.

conda-forge/conda-forge.github.io#1894

@junpuf
Copy link
Author

junpuf commented Jun 7, 2023

Thanks for providing the insight @hmaarrfk. Forcing uninstall may work for conda environment users. However, for software maintainers who currently depend on jpeg like torchvision , they will have to migrate to libjpeg-turbo and deprecate jpeg.

I read through conda-forge/conda-forge.github.io#673 and understand that there are valid reasons to force switch to libjpeg-turbo and deprecate jpeg. But like you expected, it is a painful experience for those who depend on jpeg. I will create a separate issue to torchvision maintainers and ask them to switch to libjpeg-turbo.

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jun 7, 2023

software maintainers

As I understand it torchvision, the recipe you linked to, is not dependent on the conda-forge ecosystem.
https://github.com/pytorch/vision/blob/main/packaging/torchvision/conda_build_config.yaml#L2

while there used to be a big alignment between defaults and conda-forge in the past, the two channels are, today, largely incompatible.

The torchvision package from conda-forge should be compatible
https://github.com/conda-forge/torchvision-feedstock/

on windows, we could use help in the form of packing, or donation of your "time" to manually build windows from time to time.

see the many attempts at building windows:
https://github.com/conda-forge/pytorch-cpu-feedstock/pulls

@hmaarrfk
Copy link
Contributor

hmaarrfk commented Jun 7, 2023

I forgot to say, thank you for being so understanding of the tradeoffs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants