"tests/entrypoints/pooling/basic/test_encode.py" did not exist on "edce722eaa5e9f0b97bea611531e3341ec2e2e71"
Unverified Commit d11b46f3 authored by Prashant Gupta's avatar Prashant Gupta Committed by GitHub
Browse files

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


Signed-off-by: default avatarPrashant Gupta <prashantgupta@us.ibm.com>
parent c6cf9295
...@@ -30,12 +30,12 @@ def find_tokenizer_file(files: List[str]): ...@@ -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]
......
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