test_custom_dispatcher.py 1.1 KB
Newer Older
1
2
# SPDX-License-Identifier: Apache-2.0

3
import pytest
4

5
from vllm.config import CompilationLevel
6

7
8
from ..utils import compare_two_settings

9
10
11
12
# --enforce-eager on TPU causes graph compilation
# this times out default Health Check in the MQLLMEngine,
# so we set the timeout here to 30s

13

14
15
16
def test_custom_dispatcher(monkeypatch: pytest.MonkeyPatch):
    with monkeypatch.context() as m:
        m.setenv("VLLM_RPC_TIMEOUT", "30000")
17
18
19
20
21
22
23
24
25
26
27
28
29
30
        compare_two_settings("Qwen/Qwen2.5-1.5B-Instruct",
                             arg1=[
                                 "--max-model-len=256",
                                 "--max-num-seqs=32",
                                 "--enforce-eager",
                                 f"-O{CompilationLevel.DYNAMO_ONCE}",
                             ],
                             arg2=[
                                 "--max-model-len=256", "--max-num-seqs=32",
                                 "--enforce-eager",
                                 f"-O{CompilationLevel.DYNAMO_AS_IS}"
                             ],
                             env1={},
                             env2={})