@@ -92,12 +92,13 @@ def sample_json_schema():
92
92
@pytest .mark .parametrize ("guided_decoding_backend" , GuidedDecodingBackend )
93
93
def test_guided_json_completion (guided_decoding_backend : str ,
94
94
sample_json_schema ):
95
+ runner_kwargs : Dict [str , Any ] = {}
95
96
if vllm_version_is ("0.10.2" ):
96
97
sampling_params = SamplingParams (
97
98
temperature = 1.0 ,
98
99
max_tokens = 500 ,
99
100
guided_decoding = GuidedDecodingParams (json = sample_json_schema ))
100
- runner_kwargs : Dict [ str , Any ] = {
101
+ runner_kwargs = {
101
102
"seed" : 0 ,
102
103
"guided_decoding_backend" : guided_decoding_backend ,
103
104
}
@@ -107,7 +108,7 @@ def test_guided_json_completion(guided_decoding_backend: str,
107
108
max_tokens = 500 ,
108
109
structured_outputs = StructuredOutputsParams (
109
110
json = sample_json_schema ))
110
- runner_kwargs : Dict [ str , Any ] = {
111
+ runner_kwargs = {
111
112
"seed" : 0 ,
112
113
"structured_outputs_config" : {
113
114
"backend" : guided_decoding_backend
@@ -141,12 +142,13 @@ def test_guided_json_completion(guided_decoding_backend: str,
141
142
def test_guided_regex (guided_decoding_backend : str , sample_regex ):
142
143
if guided_decoding_backend == "outlines" :
143
144
pytest .skip ("Outlines doesn't support regex-based guided decoding." )
145
+ runner_kwargs : Dict [str , Any ] = {}
144
146
if vllm_version_is ("0.10.2" ):
145
147
sampling_params = SamplingParams (
146
148
temperature = 0.8 ,
147
149
top_p = 0.95 ,
148
150
guided_decoding = GuidedDecodingParams (regex = sample_regex ))
149
- runner_kwargs : Dict [ str , Any ] = {
151
+ runner_kwargs = {
150
152
"seed" : 0 ,
151
153
"guided_decoding_backend" : guided_decoding_backend ,
152
154
}
@@ -155,7 +157,7 @@ def test_guided_regex(guided_decoding_backend: str, sample_regex):
155
157
temperature = 0.8 ,
156
158
top_p = 0.95 ,
157
159
structured_outputs = StructuredOutputsParams (regex = sample_regex ))
158
- runner_kwargs : Dict [ str , Any ] = {
160
+ runner_kwargs = {
159
161
"seed" : 0 ,
160
162
"structured_outputs_config" : {
161
163
"backend" : guided_decoding_backend
0 commit comments