[bugfix] fix f-string for error (#9295)
Signed-off-by: Prashant Gupta <prashantgupta@us.ibm.com>
This commit is contained in:
parent
c6cf9295e1
commit
d11b46f3a5
@ -30,12 +30,12 @@ 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"Found {len(matched_files)} files matching the "
|
||||||
"pattern: {matched_files}. Make sure only one Mistral "
|
f"pattern: {file_pattern}. Make sure only one Mistral "
|
||||||
"tokenizer is present in {tokenizer_name}.")
|
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"Found {len(matched_files)} files matching the "
|
||||||
"pattern: {matched_files}. Make sure that a Mistral "
|
f"pattern: {file_pattern}. Make sure that a Mistral "
|
||||||
"tokenizer is present in {tokenizer_name}.")
|
f"tokenizer is present in {files}.")
|
||||||
|
|
||||||
return matched_files[0]
|
return matched_files[0]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user