Skip to content

Commit eb4eb03

Browse files
shen-shanshanyangxiaojun0126
authored andcommitted
[Structured Output][CI] Add test for outlines backend for structured output in CI (vllm-project#2283)
### What this PR does / why we need it? Add test for `outlines` backend for structured output in CI. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Tests have all passed with: ```bash pytest -sv tests/e2e/singlecard/test_guided_decoding.py ``` - vLLM version: v0.10.0 - vLLM main: vllm-project/vllm@5341565 --------- Signed-off-by: shen-shanshan <467638484@qq.com>
1 parent 649fc31 commit eb4eb03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/e2e/singlecard/test_guided_decoding.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
os.environ["PYTORCH_NPU_ALLOC_CONF"] = "max_split_size_mb:256"
3131
MODEL_NAME = "Qwen/Qwen2.5-0.5B-Instruct"
3232

33-
GuidedDecodingBackend = ["xgrammar", "guidance"]
33+
GuidedDecodingBackend = ["xgrammar", "guidance", "outlines"]
3434

3535

3636
@pytest.fixture(scope="module")
@@ -120,6 +120,9 @@ def test_guided_json_completion(guided_decoding_backend: str,
120120

121121
@pytest.mark.parametrize("guided_decoding_backend", GuidedDecodingBackend)
122122
def test_guided_regex(guided_decoding_backend: str, sample_regex):
123+
if guided_decoding_backend == "outlines":
124+
pytest.skip("Outlines doesn't support regex-based guided decoding.")
125+
123126
sampling_params = SamplingParams(
124127
temperature=0.8,
125128
top_p=0.95,

0 commit comments

Comments
 (0)