Torch Hub download fails due to Torchvision dependency?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🐛 Describe the bug
Running the following code returns the error seen below. It seems like there is some type of dependency or call to torchvision. Torchvision, however, doesn't list the new efficientnet models.

import torch
from torch import hub
#import torchvision.models as models
resnet18_model = torch.hub.load('pytorch/vision:main',
'resnet18',
pretrained = True)

It seems like there is something missing. I have cleared my .cache folder, and even updated the efficientnet.py code on my local machine to match the latest. Still receiving this Import Error. I am running the following versions:

Even if I do a simple:
torch.hub.list('pytorch/vision')
I receive the following error:

Versions

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the shown torch.hub.load and torch.hub.list calls, then inspect the efficientnet.py dependency path mentioned in the report. Compare the installed torchvision models and the repository revision used by Torch Hub. Done means both hub calls complete without the reported import error and the expected EfficientNet models are available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100