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

torchvision 0.16 is not compatible with PT 1.13.1 #8233

Closed
ningziwen opened this issue Jan 26, 2024 · 1 comment
Closed

torchvision 0.16 is not compatible with PT 1.13.1 #8233

ningziwen opened this issue Jan 26, 2024 · 1 comment

Comments

@ningziwen
Copy link

🐛 Describe the bug

Sample code

from torchvision.datasets import mnist

Error:

    from torchvision.datasets import mnist
  File "/usr/local/lib/python3.10/site-packages/torchvision/__init__.py", line 6, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
  File "/usr/local/lib/python3.10/site-packages/torchvision/models/__init__.py", line 2, in <module>
    from .convnext import *
  File "/usr/local/lib/python3.10/site-packages/torchvision/models/convnext.py", line 8, in <module>
    from ..ops.misc import Conv2dNormActivation, Permute
  File "/usr/local/lib/python3.10/site-packages/torchvision/ops/__init__.py", line 23, in <module>
    from .poolers import MultiScaleRoIAlign
  File "/usr/local/lib/python3.10/site-packages/torchvision/ops/poolers.py", line 10, in <module>
    from .roi_align import roi_align
  File "/usr/local/lib/python3.10/site-packages/torchvision/ops/roi_align.py", line 4, in <module>
    import torch._dynamo
ModuleNotFoundError: No module named 'torch._dynamo'

This change which was released in 0.16 used _dynamo. _dynamo is part of the change which only released from PT 2.0.

Versions

torchvision=0.16
torch=1.13.1

@NicolasHug
Copy link
Member

Thanks for the report @ningziwen . That is expected, from our dependency table, you will either want to install pytorch 2.1 to use torchvision 0.16, or install torchvision 0.14 to install pytorch 1.13.

https://github.com/pytorch/vision#installation

image

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

No branches or pull requests

2 participants