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

导包出现错误 #1

Closed
KyrieXDL opened this issue Apr 19, 2021 · 5 comments
Closed

导包出现错误 #1

KyrieXDL opened this issue Apr 19, 2021 · 5 comments

Comments

@KyrieXDL
Copy link

from transformers.file_utils import ModelOutput, add_start_docstrings, add_start_docstrings_to_model_forward ImportError: cannot import name 'add_start_docstrings_to_model_forward'

请问出现这个错误是什么原因呢

@JunnYu
Copy link
Owner

JunnYu commented Apr 19, 2021

from transformers.file_utils import ModelOutput, add_start_docstrings, add_start_docstrings_to_model_forward ImportError: cannot import name 'add_start_docstrings_to_model_forward'

请问出现这个错误是什么原因呢

建议更新transformers库,你的版本可能太低, pip install -U transformers

@KyrieXDL
Copy link
Author

from transformers.file_utils import ModelOutput, add_start_docstrings, add_start_docstrings_to_model_forward ImportError: cannot import name 'add_start_docstrings_to_model_forward'
请问出现这个错误是什么原因呢

建议更新transformers库,你的版本可能太低, pip install -U transformers
博主你好,请问你的transformers版本是多少呢,我直接升级到最新版会和一些已有的包版本冲突

@JunnYu
Copy link
Owner

JunnYu commented Apr 20, 2021

@KyrieXDL 那就你手动把src/roformer/modeling_roformer.py中的有关add_start_docstrings_to_model_forward代码删掉,顺便问下你的transformers什么版本?

@KyrieXDL
Copy link
Author

@KyrieXDL 那就你手动把src/roformer/modeling_roformer.py中的有关add_start_docstrings_to_model_forward代码删掉,顺便问下你的transformers什么版本?

我目前用的3.4.0的版本

@KyrieXDL
Copy link
Author

非常感谢,我升级到3.5.1已经解决了,我看到transformers官方文档中3.4.0的版本有api还不支持

@JunnYu JunnYu closed this as completed Apr 20, 2021
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

2 participants