赞
踩
- Traceback (most recent call last):
- File "test.py", line 53, in <module>
- b_scorer = BERTScorer(lang="zh", model_type=embedding_model_dirpath, num_layers=num_layers)
- File "bert_score/scorer.py", line 97, in __init__
- self._tokenizer = get_tokenizer(self.model_type, self._use_fast_tokenizer)
- File "bert_score/utils.py", line 343, in get_tokenizer
- tokenizer = AutoTokenizer.from_pretrained(model_type, use_fast=use_fast)
- File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 701, in from_pretrained
- tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
- File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py", line 534, in get_tokenizer_config
- resolved_config_file = cached_file(
- File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/transformers/utils/hub.py", line 429, in cached_file
- resolved_file = hf_hub_download(
- File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
- validate_repo_id(arg_value)
- File "/root/anaconda3/envs/vllm/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
- raise HFValidationError(
- huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'EmbeddingModel/BERT/reberta-large'. Use `repo_type` argument if needed.
使用本地模型进行BERTScore指标计算时,请确认路径是否正确,如果模型路径不存在,会产生报错:
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。