MadryLab / robustness

A library for experimenting with, training and evaluating neural networks, with a focus on adversarial robustness.
MIT License
903 stars 181 forks source link

torchvision-dependent code breaks for version `0.11.3+cu113` #113

Open lxuechen opened 2 years ago

lxuechen commented 2 years ago

Running simple checks, I get

Traceback (most recent call last):
  File "breeds_check.py", line 5, in <module>
    from robustness import datasets
  File "/opt/conda/envs/explainx/lib/python3.8/site-packages/robustness/datasets.py", line 22, in <module>
    from . import imagenet_models, cifar_models
  File "/opt/conda/envs/explainx/lib/python3.8/site-packages/robustness/imagenet_models/__init__.py", line 3, in <module>
    from .vgg import *
  File "/opt/conda/envs/explainx/lib/python3.8/site-packages/robustness/imagenet_models/vgg.py", line 3, in <module>
    from torchvision.models.utils import load_state_dict_from_url
ModuleNotFoundError: No module named 'torchvision.models.utils'

Related issues here and here.

lxuechen commented 2 years ago

Just a note that this doesn't appear to be an issue in main. Installing via pip defaults to the last tag, which has this issue.