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

无法加载模型 #58

Open
BMM666hh opened this issue Sep 5, 2024 · 0 comments
Open

无法加载模型 #58

BMM666hh opened this issue Sep 5, 2024 · 0 comments

Comments

@BMM666hh
Copy link

BMM666hh commented Sep 5, 2024

加载预训练好的词向量模型总是报错HTTP404,请问是网址停用了吗?如果是停用了还有什么别的下载方式吗?

报错信息具体如下:
2024-09-05 23:08:09 - urllib3.connectionpool - DEBUG: - Starting new HTTP connection (1): 212.129.155.247:80
2024-09-05 23:08:09 - urllib3.connectionpool - DEBUG: - http://212.129.155.247:80 "GET /embedding/roberta-base.zip HTTP/1.1" 404 3650
Traceback (most recent call last):
.......
self.model = _RobertaWordModel(model_dir_or_name=model_dir_or_name, vocab=vocab, layers=layers,
File "/root/miniconda3/lib/python3.10/site-packages/fastNLP/embeddings/roberta_embedding.py", line 215, in init
self.tokenizer = RobertaTokenizer.from_pretrained(model_dir_or_name)
File "/root/miniconda3/lib/python3.10/site-packages/fastNLP/modules/tokenizer/roberta_tokenizer.py", line 70, in from_pretrained
model_dir = _get_roberta_dir(model_dir_or_name)
File "/root/miniconda3/lib/python3.10/site-packages/fastNLP/io/file_utils.py", line 538, in _get_roberta_dir
model_dir = cached_path(model_url, name='embedding')
File "/root/miniconda3/lib/python3.10/site-packages/fastNLP/io/file_utils.py", line 187, in cached_path
return get_from_cache(url_or_filename, Path(data_cache))
File "/root/miniconda3/lib/python3.10/site-packages/fastNLP/io/file_utils.py", line 459, in get_from_cache
raise HTTPError(f"Status code:{req.status_code}. Fail to download from {url}.")
requests.exceptions.HTTPError: Status code:404. Fail to download from http://212.129.155.247/embedding/roberta-base.zip.

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