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 16ee4b0 commit 7707f2c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions benchmarks/backend_request_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
from transformers import (AutoTokenizer, PreTrainedTokenizer,
PreTrainedTokenizerFast)

vllm_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(vllm_dir)
from vllm.transformers_utils.tokenizers import MistralTokenizer

Check failure on line 17 in benchmarks/backend_request_func.py

View workflow job for this annotation

GitHub Actions / ruff (3.12)

Ruff (E402)

benchmarks/backend_request_func.py:17:1: E402 Module level import not at top of file

AIOHTTP_TIMEOUT = aiohttp.ClientTimeout(total=6 * 60 * 60)


Expand Down Expand Up @@ -432,12 +436,6 @@ def get_tokenizer(
"Cannot use the fast tokenizer in slow tokenizer mode.")
kwargs["use_fast"] = False
if tokenizer_mode == "mistral":
vllm_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(vllm_dir)
from vllm.transformers_utils.tokenizers import (
MistralTokenizer
)

return MistralTokenizer.from_pretrained(
str(pretrained_model_name_or_path))
else:
Expand Down

0 comments on commit 7707f2c

Please sign in to comment.