eto-ai / rikai

Parquet-based ML data format optimized for working with unstructured data
https://rikai.readthedocs.io/en/latest/
Apache License 2.0
136 stars 19 forks source link

Some pretrained torchvision is only available in torchvision > 0.10.0 #622

Closed da-liii closed 2 years ago

da-liii commented 2 years ago
>>> from torchvision.models import efficientnet_b0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'efficientnet_b0' from 'torchvision.models' (/Users/da/.pyenv/versions/rikai/lib/python3.8/site-packages/torchvision/models/__init__.py)
>>> import torchvision
>>> torchvision.__version__
'0.10.0'

From CI, we can know that torchvision 0.12.0 is the workable version.

We have two choices:

eddyxu commented 2 years ago

i think it might be easy just bump pytorch and torchvision version

da-liii commented 2 years ago
Python 3.8.10 (default, May 19 2021, 11:01:55)
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from torchvision.models import convnext_base
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'convnext_base' from 'torchvision.models' (/Users/da/.pyenv/versions/rikai-yolov5/lib/python3.8/site-packages/torchvision/models/__init__.py)
>>>

from torchvision.models import convnext_base does not work for torchvision 0.11.3, but works fine for torchvision 0.12.0.