[watermark] compatibility validation (#56801)
Signed-off-by: Raphael Rialland <raphael.rialland@mistral.ai> Signed-off-by: Simon Veitner <sveitner@redhat.com> Co-authored-by: Simon Veitner <sveitner@redhat.com>
This commit is contained in:
co-authored by
Simon Veitner
parent
88f3c601b3
commit
c32495d58f
@@ -82,7 +82,12 @@ def _validate(enable_trace_replay: bool) -> None:
|
||||
enable_trace_replay=enable_trace_replay,
|
||||
is_diffusion=False,
|
||||
),
|
||||
vllm_config=SimpleNamespace(reasoning_config=None),
|
||||
vllm_config=SimpleNamespace(
|
||||
reasoning_config=None,
|
||||
# Engine has no watermark configuration.
|
||||
_check_supports_watermarking=lambda params: False,
|
||||
),
|
||||
resolve_watermarking=lambda params: False,
|
||||
speculative_config=None,
|
||||
structured_outputs_config=None,
|
||||
diffusion_config=None,
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from types import SimpleNamespace
|
||||
from unittest.mock import AsyncMock
|
||||
|
||||
import pytest
|
||||
|
||||
from vllm.v1.engine.async_llm import AsyncLLM
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_kv_transfer_rejection_stub_disables_watermarking():
|
||||
engine = object.__new__(AsyncLLM)
|
||||
add_request = AsyncMock()
|
||||
engine.engine_core = SimpleNamespace(
|
||||
add_request_async=add_request,
|
||||
shutdown=lambda **kwargs: None,
|
||||
)
|
||||
|
||||
await engine.notify_kv_transfer_request_rejected(
|
||||
"request",
|
||||
{"do_remote_prefill": True},
|
||||
)
|
||||
|
||||
request = add_request.call_args.args[0]
|
||||
assert request.sampling_params.watermarking is False
|
||||
Reference in New Issue
Block a user