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 dependency issue #312

Open
adamkarvonen opened this issue Dec 21, 2024 · 0 comments
Open

Torchvision dependency issue #312

adamkarvonen opened this issue Dec 21, 2024 · 0 comments

Comments

@adamkarvonen
Copy link

Most times that I install nnsight on a new machine, I get this error:

Traceback (most recent call last):
File "/workspace/dictionary_learning/demo.py", line 2, in
from nnsight import LanguageModel
File "/opt/conda/lib/python3.10/site-packages/nnsight/init.py", line 35, in
from .models.LanguageModel import LanguageModel
File "/opt/conda/lib/python3.10/site-packages/nnsight/models/LanguageModel.py", line 8, in
from transformers import (
File "", line 1075, in _handle_fromlist
File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1781, in getattr
module = self._get_module(self._class_to_module[name])
File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1795, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.modeling_utils because of the following error (look up to see its traceback):

Because the default version of torchvision installed is 0.17. If I install torchvision 0.20.1, the error goes away.

The most recent time this happened was with torch version 2.5.1 and nnsight version 0.3.7.

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

1 participant