Skip to content

Commit

Permalink
Remove debug spam, use logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cg123 committed Jul 16, 2024
1 parent b06edc9 commit ed1fe27
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions mergekit/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit ed1fe27

Please sign in to comment.