-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
🐛 Description
使用get_pretrained_i2v这个函数的时候,无法获取模型列表以及下载模型。报错信息会返回错误码500. 因此,应该是MODELHUB_URL链接失效
Error Message
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[4], line 1
----> 1 i2v = get_pretrained_i2v("quesnet_test_256", model_dir=output_dir)
File d:\FinalYearProject\qnet\.venv\lib\site-packages\EduNLP\I2V\i2v.py:723, in get_pretrained_i2v(name, model_dir, device)
690 def get_pretrained_i2v(name, model_dir=MODEL_DIR, device='cpu'):
691 """
692 It is a good idea if you want to switch item to vector earily.
693
(...)
721 ([array([ ...dtype=float32)], [[array([ ...dtype=float32)]])
722 """
--> 723 pretrained_models = get_all_pretrained_models()
724 if name not in pretrained_models:
725 raise KeyError(
726 "Unknown model name %s, use one of the provided models: %s" % (name, ", ".join(pretrained_models))
727 )
File d:\FinalYearProject\qnet\.venv\lib\site-packages\EduNLP\Vector\t2v.py:139, in get_all_pretrained_models()
137 url = MODELHUB_URL + 'getPretrainedModelList'
138 r = requests.get(url)
--> 139 assert r.status_code == 200, r.status_code
140 r = json.loads(r.content)
141 return r['name']
AssertionError: 500
To Reproduce
i2v = get_pretrained_i2v("quesnet_test_256", model_dir=output_dir)Environment
Environment Information
Operating System: Windows 11
Python Version: Python 3.10
Additional context
请问能够更换有效的MODELHUB_URL,或者能否从其他地方下载预训练的模型
Metadata
Metadata
Assignees
Labels
No labels