Description
We are currently skipping JPEG reference tests on Windows, since the Windows wheels of Pillow
are built against libjpeg-turbo
while we build torchvision
against libjpeg
Line 481 in bbeb320
As of Pillow==9.0.0
, all wheels are now built against libjpeg-turbo
, which leads to the CI failures that are currently happening. Thus, these tests will now fail for every OS or at least only succeed by chance.
There are multiple ways out in descending order of preference by me:
- Install
Pillow
from conda-forge rather from PyPI to enforce the same JPEG library fortorchvision
andPillow
. - Pin
Pillow<9
for unittest CI. This basically preserves the behavior we had before. - Remove these tests completely.
The only downside of 1. that I see is that Pillow
on conda-forge is released later than on PyPI. IIUC, the conda-forge package is community managed and they only start building when it is released on PyPI. If there are build failures it might take some time until the versions converge again. In the meantime, our tests would not pick up on any incompatibilities with Pillow
in general not just for JPEG I/O. Thus, we would need to rely on user feedback that something is not working.
Given that this is an dependency issue, I would be fine with waiting for user reports in the time of Pillow
version divergence between conda-forge and PyPI. If we don't want to accept that, we could also hide all JPEG compatibility tests behind a runtime flag and add another CI job that only runs these tests while enforcing 1. from above.