[Question]: UnboundLocalError: local variable 'model_id' referenced before assignment
susht3 opened this issue · comments
Description
loader = AutoLoader(
task_name="txt_img_matching",
model_dir="./checkpoints",
model_name="altclip-xlmr-l"
)
获取加载好的模型
model = loader.get_model()
加载模型遇到以下错误:
Model hub is not reachable.
Model hub is not reachable!
Traceback (most recent call last):
File "inference.py", line 8, in
loader = AutoLoader(
File "/mnt/lustrenew/FlagAI/flagai/auto_model/auto_loader.py", line 218, in init
self.model = getattr(LazyImport(self.model_name[0]),
File "/mnt/lustrenew/FlagAI/flagai/model/mm/AltCLIP.py", line 446, in from_pretrain
super().download(download_path, model_name, only_download_config=only_download_config)
File "/mnt/lustrenew/FlagAI/flagai/model/base_model.py", line 263, in download
if model_id and model_id != "null":
UnboundLocalError: local variable 'model_id' referenced before assignment
Alternatives
No response