Skip to content

transformer报错 #32

Description

@happyeverydayxixi

您好!报错信息如下:Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
ImportError: cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)
Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
ImportError: cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)
Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
ImportError: cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)
Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
ImportError: cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)
Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
ImportError: cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)
Traceback (most recent call last):
Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_classfrom utils import extract_ans, make_output_dir, get_runner_class

File "/home/zhenghan/CMB/src/utils.py", line 6, in
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfigfrom transformers import GenerationConfig

ImportErrorImportError: : cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)cannot import name 'GenerationConfig' from 'transformers' (/home/zhenghan/.local/lib/python3.8/site-packages/transformers/init.py)

Traceback (most recent call last):
File "./src/generate_answers.py", line 6, in
from utils import extract_ans, make_output_dir, get_runner_class
File "/home/zhenghan/CMB/src/utils.py", line 6, in
from transformers import GenerationConfig
请问如何解决呢?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions