From 4a5be4bc0949167ada042a74a038b11fc6f58200 Mon Sep 17 00:00:00 2001 From: Jintao Date: Wed, 27 Sep 2023 17:12:09 +0800 Subject: [PATCH] fix hf bug (#569) --- modelscope/utils/hf_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelscope/utils/hf_util.py b/modelscope/utils/hf_util.py index 5722928a..6ef98ccf 100644 --- a/modelscope/utils/hf_util.py +++ b/modelscope/utils/hf_util.py @@ -133,7 +133,7 @@ def check_hf_code(model_dir: str, auto_class: type, tokenizer_class = tokenizer_config.get('tokenizer_class') if tokenizer_class is not None: return - if model_type in TOKENIZER_MAPPING_NAMES: + if model_type not in TOKENIZER_MAPPING_NAMES: raise ValueError( f'{model_type} not found in HF `TOKENIZER_MAPPING_NAMES`{trust_remote_code_info}' )