Skip to content

Commit

Permalink
chore: fix ci lint
Browse files Browse the repository at this point in the history
Signed-off-by: elijah <[email protected]>
  • Loading branch information
e1ijah1 committed Jan 13, 2025
1 parent 971102d commit b870182
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions benchmarks/backend_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def get_tokenizer(
**kwargs,
) -> Union[PreTrainedTokenizer, PreTrainedTokenizerFast]:
if pretrained_model_name_or_path is not None and not os.path.exists(
pretrained_model_name_or_path):
pretrained_model_name_or_path):
pretrained_model_name_or_path = get_model(
pretrained_model_name_or_path)
if tokenizer_mode == "slow":
Expand All @@ -433,12 +433,13 @@ def get_tokenizer(
kwargs["use_fast"] = False
if tokenizer_mode == "mistral":
try:
from vllm.transformers_utils.tokenizer import (
MistralTokenizer)
except ImportError:
from vllm.transformers_utils.tokenizer import MistralTokenizer
except ImportError as e:
raise ImportError(
"MistralTokenizer requires vllm package.\n"
"Please install it with `pip install vllm` to use mistral tokenizer mode.")
"Please install it with `pip install vllm` "
"to use mistral tokenizer mode."
) from e
return MistralTokenizer.from_pretrained(
str(pretrained_model_name_or_path))
else:
Expand Down

0 comments on commit b870182

Please sign in to comment.