[bugfix] fix f-string for error (#9295)

Signed-off-by: Prashant Gupta <prashantgupta@us.ibm.com>
This commit is contained in:
Prashant Gupta 2024-10-11 17:03:48 -07:00 committed by GitHub
parent c6cf9295e1
commit d11b46f3a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,12 +30,12 @@ def find_tokenizer_file(files: List[str]):
matched_files = [file for file in files if file_pattern.match(file)]
if len(matched_files) > 1:
raise OSError(f"Found {len(matched_files)} files matching the "
"pattern: {matched_files}. Make sure only one Mistral "
"tokenizer is present in {tokenizer_name}.")
f"pattern: {file_pattern}. Make sure only one Mistral "
f"tokenizer is present in {files}.")
elif len(matched_files) == 0:
raise OSError(f"Found {len(matched_files)} files matching the "
"pattern: {matched_files}. Make sure that a Mistral "
"tokenizer is present in {tokenizer_name}.")
f"pattern: {file_pattern}. Make sure that a Mistral "
f"tokenizer is present in {files}.")
return matched_files[0]