From eb1c4ada2acb98941820a4c44dd43d10992ef574 Mon Sep 17 00:00:00 2001 From: "jack.butler" Date: Tue, 7 Feb 2023 09:19:24 +0000 Subject: [PATCH] rename arg name to model_name --- model/supervised_finetuning/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model/supervised_finetuning/utils.py b/model/supervised_finetuning/utils.py index 9aba63c7..c3b8264f 100644 --- a/model/supervised_finetuning/utils.py +++ b/model/supervised_finetuning/utils.py @@ -35,13 +35,13 @@ TOKENIZER_CONFIGS = { } -def match_tokenizer_name(name: str) -> TokenizerConfig: +def match_tokenizer_name(model_name: str) -> TokenizerConfig: """Match a partial model name to a tokenizer configuration""" - tokenizer_config_matches = [config for name, config in TOKENIZER_CONFIGS.items() if name in name] + tokenizer_config_matches = [config for name, config in TOKENIZER_CONFIGS.items() if name in model_name] if not tokenizer_config_matches: - raise ValueError(f"Cannot find any tokeniser configuration to match {name=}") + raise ValueError(f"Cannot find any tokeniser configuration to match {model_name=}") elif 1 < len(tokenizer_config_matches): - raise ValueError(f"Found multiple tokeniser configuration matches for {name=}") + raise ValueError(f"Found multiple tokeniser configuration matches for {model_name=}") else: return tokenizer_config_matches[0]