Closed hmaarrfk closed 2 months ago
It looks like the issue might be in line 57 of test_transforms_v2.py
pytestmark = [pytest.mark.filterwarnings("error")]
I could be wrong. The comment above it suggests that warnings are turned into errors, and your log suggests that you're using torch.load 'with weights_only=False'. Is this explicitly called in your arguments or are you relying on the default value?
I am running the test suite when building the package for conda-forge.
I've removed that line to move forward with our builds, but I mostly wanted to flag this to the pytorch team as a whole.
We sometimes find ourselves a little more bleeding edge at the conda-forge builds, but I found it strange since torchvision officially supports pytorch 2.4.0 and that is when that warning first appeared.
Thanks for the report @hmaarrfk .
I think the error you're observing has already been addressed in both torchvision and pytorch codebases. I had opened https://github.com/pytorch/vision/issues/8517 in torchvision and https://github.com/pytorch/pytorch/issues/130242 in pytorch, and https://github.com/pytorch/pytorch/pull/130246 was the fix. It may not have been picked up in pytorch 2.4 but hopefully it should be included in pytorch 2.4.1 (and in any case, in 2.5).
great thanks!
My reading of the solution is that you specified False
which stops triggering the warning, but you left the "unsecure loading".
hmm, i have to say, one of the things i dislike the most about pytorch is its usage of pickle to load and store data structures.
I understand it enables fast iteration, but these security problems are a long standing issue in the design of pickle. However I also understand that it is difficult to move away from storage formats.
So good luck working through this migration (torchvision + pytorch!).
We are looking forward to continuing to be users of your software!
Hopefully you don't find my opening of issues too annoying.
🐛 Describe the bug
Personally, I'm unable to follow the codepath, but it seems that the recent warning introcued in pytroch 2.4 is causing the test_transforms_v2 tests to fail due to the very strict warnings.
https://github.com/pytorch/vision/blob/main/test/test_transforms_v2.py#L57
Versions
Pytorch 2.4 Conda-forge
sample log from https://github.com/conda-forge/torchvision-feedstock/pull/94: 181.log.txt