We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
i tried to use latest version of openprompt (pip install openprompt and aslo tried by cloning from github) with transformer 4.41 and 4.42 b
`oduleNotFoundError Traceback (most recent call last) Cell In[2], line 9 7 print(transformers.version) 8 print(transformers.file) ----> 9 import openprompt 10 print(openprompt.version) 11 print(openprompt.file)
File /usr/local/lib/python3.10/dist-packages/openprompt/init.py:2 1 version = "1.0.1" ----> 2 from .pipeline_base import PromptDataLoader, PromptModel, PromptForClassification, PromptForGeneration 3 from .utils import * 4 from .prompt_base import Template, Verbalizer
File /usr/local/lib/python3.10/dist-packages/openprompt/pipeline_base.py:4 2 from torch.utils.data.sampler import RandomSampler 3 from transformers.configuration_utils import PretrainedConfig ----> 4 from transformers.generation_utils import GenerationMixin 5 import torch 6 import torch.nn as nn
ModuleNotFoundError: No module named 'transformers.generation_utils'`
The text was updated successfully, but these errors were encountered:
change from transformers.generation_utils import GenerationMixin to from transformers import GenerationMixin can solve the problem
from transformers.generation_utils import GenerationMixin
from transformers import GenerationMixin
I reported this a few days ago: #309
Sorry, something went wrong.
No branches or pull requests
i tried to use latest version of openprompt (pip install openprompt and aslo tried by cloning from github) with transformer 4.41 and 4.42 b
`oduleNotFoundError Traceback (most recent call last)
Cell In[2], line 9
7 print(transformers.version)
8 print(transformers.file)
----> 9 import openprompt
10 print(openprompt.version)
11 print(openprompt.file)
File /usr/local/lib/python3.10/dist-packages/openprompt/init.py:2
1 version = "1.0.1"
----> 2 from .pipeline_base import PromptDataLoader, PromptModel, PromptForClassification, PromptForGeneration
3 from .utils import *
4 from .prompt_base import Template, Verbalizer
File /usr/local/lib/python3.10/dist-packages/openprompt/pipeline_base.py:4
2 from torch.utils.data.sampler import RandomSampler
3 from transformers.configuration_utils import PretrainedConfig
----> 4 from transformers.generation_utils import GenerationMixin
5 import torch
6 import torch.nn as nn
ModuleNotFoundError: No module named 'transformers.generation_utils'`
The text was updated successfully, but these errors were encountered: