-
Notifications
You must be signed in to change notification settings - Fork 1
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
代码复现失败 #7
Comments
你好,我也在复现作者的代码。将模型拷入本地后,在train.sh中修改“--bart_name facebook/bart-base“为”--bart_name ./pretrained_model/bart-base“应该可以解决这个问题。 |
我的项目结构如上,按照您的建议修改train.sh后还是报错在
train.py的116行 'facebook/bart-base' is a correct model identifier listed on 'https://huggingface.co/models'
请您指教!
…------------------ 原始邮件 ------------------
发件人: "NUSTM/GMNER" ***@***.***>;
发送时间: 2024年5月21日(星期二) 下午4:27
***@***.***>;
***@***.******@***.***>;
主题: Re: [NUSTM/GMNER] 代码复现失败 (Issue #7)
你好,我也在复现作者的代码。将模型拷入本地后,在train.sh中修改“--bart_name facebook/bart-base“为”--bart_name ./pretrained_model/bart-base“应该可以解决这个问题。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
或许你可以检查一下模型路径是否正确,或者bart-base文件夹下的配置文件是否完整。 |
看到之前好像已经有类似的问题已被解决,您可以尝试一下 |
您好这个图片上的问题您解决了吗 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python3.8.18按照要求安装对应版本的库报错如下:
File "train.py", line 116, in
model = BartSeq2SeqModel.build_model(args.bart_name, tokenizer, label_ids=label_ids, decoder_type=args.decoder_type,
File "/data0/pjy_data/zqz/GMNER/model/bart_multi_concat.py", line 275, in build_model
model = BartModel.from_pretrained(bart_model)
File "/data0/pjy_data/anaconda/envs/zqzpy3.8/lib/python3.8/site-packages/transformers/modeling_utils.py", line 935, in from_pretrained
raise EnvironmentError(msg)
OSError: Can't load weights for 'facebook/bart-base'. Make sure that:
'facebook/bart-base' is a correct model identifier listed on 'https://huggingface.co/models'
or 'facebook/bart-base' is the correct path to a directory containing a file named one of pytorch_model.bin, tf_model.h5, model.ckpt.
尝试在train.py 加入代码
import os
os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' 未成功
将模型拷入本地,在train.sh中修改模型地址也未成功
求解答,谢谢
The text was updated successfully, but these errors were encountered: