File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 8
8
from vllm import LLM , SamplingParams
9
9
from vllm .transformers_utils .tokenizer import get_tokenizer
10
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" )]
13
14
14
15
15
16
def _read_prompts (filename : str ) -> str :
@@ -24,15 +25,15 @@ def _read_prompts(filename: str) -> str:
24
25
def example_prompts () -> List [str ]:
25
26
prompts = []
26
27
for filename in _TEST_PROMPTS :
27
- prompts += _read_prompts (os . path . join ( "tests" , filename ) )
28
+ prompts += _read_prompts (filename )
28
29
return prompts
29
30
30
31
31
32
@pytest .fixture
32
33
def example_long_prompts () -> List [str ]:
33
34
prompts = []
34
35
for filename in _LONG_PROMPTS :
35
- prompts += _read_prompts (os . path . join ( "tests" , filename ) )
36
+ prompts += _read_prompts (filename )
36
37
return prompts
37
38
38
39
You can’t perform that action at this time.
0 commit comments