@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 4aaafdd289
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 05:30 UTC

[BUGFIX] Fix the path of test prompts (#2273)

Zhuohan Li committed Dec 27, 2023 at 02:37 UTC 4aaafdd289f57a82513a7742155e4f1b796c8bdc
1 file changed +5 -4
tests/conftest.py
+5 -4
@@ -8,8 +8,9 @@ from transformers import AutoModelForCausalLM
8 from vllm import LLM, SamplingParams
9 from vllm.transformers_utils.tokenizer import get_tokenizer
10
11 -_TEST_PROMPTS = ["prompts/example.txt"]
12 -_LONG_PROMPTS = ["prompts/summary.txt"]
11 +_TEST_DIR = os.path.dirname(__file__)
12 +_TEST_PROMPTS = [os.path.join(_TEST_DIR, "prompts", "example.txt")]
13 +_LONG_PROMPTS = [os.path.join(_TEST_DIR, "prompts", "summary.txt")]
14
15
16 def _read_prompts(filename: str) -> str:
@@ -24,7 +25,7 @@ def _read_prompts(filename: str) -> str:
25 def example_prompts() -> List[str]:
26 prompts = []
27 for filename in _TEST_PROMPTS:
27 - prompts += _read_prompts(os.path.join("tests", filename))
28 + prompts += _read_prompts(filename)
29 return prompts
30
31
@@ -32,7 +33,7 @@ def example_prompts() -> List[str]:
33 def example_long_prompts() -> List[str]:
34 prompts = []
35 for filename in _LONG_PROMPTS:
35 - prompts += _read_prompts(os.path.join("tests", filename))
36 + prompts += _read_prompts(filename)
37 return prompts
38
39