Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/e2e/singlecard/test_guided_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import pytest
import regex as re
from vllm.outputs import RequestOutput
from vllm.sampling_params import GuidedDecodingParams, SamplingParams
from vllm.sampling_params import SamplingParams, StructuredOutputsParams

from tests.e2e.conftest import VllmRunner

Expand Down Expand Up @@ -87,12 +87,12 @@ def test_guided_json_completion(guided_decoding_backend: str,
sampling_params = SamplingParams(
temperature=1.0,
max_tokens=500,
guided_decoding=GuidedDecodingParams(json=sample_json_schema))
structured_outputs=StructuredOutputsParams(json=sample_json_schema))

with VllmRunner(
MODEL_NAME,
seed=0,
guided_decoding_backend=guided_decoding_backend,
structured_outputs_config=dict(backend=guided_decoding_backend),
) as vllm_model:
prompts = [
f"Give an example JSON for an employee profile "
Expand Down Expand Up @@ -125,12 +125,12 @@ def test_guided_regex(guided_decoding_backend: str, sample_regex):
sampling_params = SamplingParams(
temperature=0.8,
top_p=0.95,
guided_decoding=GuidedDecodingParams(regex=sample_regex))
structured_outputs=StructuredOutputsParams(regex=sample_regex))

with VllmRunner(
MODEL_NAME,
seed=0,
guided_decoding_backend=guided_decoding_backend,
structured_outputs_config=dict(backend=guided_decoding_backend),
) as vllm_model:
prompts = [
f"Give an example IPv4 address with this regex: {sample_regex}"
Expand Down
4 changes: 2 additions & 2 deletions vllm_ascend/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
model_config = vllm_config.model_config
parallel_config = vllm_config.parallel_config
cache_config = vllm_config.cache_config
decoding_config = vllm_config.decoding_config
structured_outputs_config = vllm_config.structured_outputs_config
scheduler_config = vllm_config.scheduler_config
ascend_scheduler_config = ascend_config.ascend_scheduler_config

Expand All @@ -138,7 +138,7 @@ def check_and_update_config(cls, vllm_config: VllmConfig) -> None:
"as the performance of operators supporting this feature "
"functionality is currently suboptimal.")
if not model_config.is_multimodal_model and \
decoding_config.backend == "auto" and \
structured_outputs_config.backend == "auto" and \
not scheduler_config.delay_factor > 0 and \
not scheduler_config.send_delta_data and \
scheduler_config.policy == "fcfs":
Expand Down
Loading