Unverified Commit 432cf22a authored by Kebe's avatar Kebe Committed by GitHub
Browse files

[Bugfix] Fix regex compile display format (#15368)


Signed-off-by: default avatarKebe <mail@kebe7jun.com>
parent 2914006f
...@@ -124,13 +124,15 @@ def find_tokenizer_file(files: List[str]): ...@@ -124,13 +124,15 @@ def find_tokenizer_file(files: List[str]):
matched_files = [file for file in files if file_pattern.match(file)] matched_files = [file for file in files if file_pattern.match(file)]
if len(matched_files) > 1: if len(matched_files) > 1:
raise OSError(f"Found {len(matched_files)} files matching the " raise OSError(
f"pattern: {file_pattern}. Make sure only one Mistral " f"Found {len(matched_files)} files matching the "
f"tokenizer is present in {files}.") f"pattern: `{file_pattern.pattern}`. Make sure only one Mistral "
f"tokenizer is present in {files}.")
elif len(matched_files) == 0: elif len(matched_files) == 0:
raise OSError(f"Found {len(matched_files)} files matching the " raise OSError(
f"pattern: {file_pattern}. Make sure that a Mistral " f"Found {len(matched_files)} files matching the "
f"tokenizer is present in {files}.") f"pattern: `{file_pattern.pattern}`. Make sure that a Mistral "
f"tokenizer is present in {files}.")
return matched_files[0] return matched_files[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment