From ed1fe278f14aeabed944fc8078ec64bac71b7684 Mon Sep 17 00:00:00 2001 From: Charles Goddard Date: Mon, 15 Jul 2024 18:22:55 -0700 Subject: [PATCH] Remove debug spam, use logging --- mergekit/merge.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mergekit/merge.py b/mergekit/merge.py index 5a6348c9..60189f44 100644 --- a/mergekit/merge.py +++ b/mergekit/merge.py @@ -167,18 +167,13 @@ def _set_chat_template( if template: model_templates.append(template.strip()) except Exception as e: - print( - f"Failed to load tokenizer for {model}. Skipping chat template.", - ) - print(e) - - print(f"Model templates: {model_templates}") + logging.warning(f"Unable to load tokenizer for {model}", exc_info=e) if not model_templates: return chat_template = Counter(model_templates).most_common(1)[0][0] - print(f"Auto-selected chat template: {chat_template}") + logging.info(f"Auto-selected chat template: {chat_template}") elif importlib.resources.is_resource(chat_templates, chat_template + ".jinja"): with importlib.resources.open_text(