A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 15, 07:15 UTC
[CI/Build] Remove V0 LoRA test (#19066)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Jee Jee Li committed
Jun 3, 2025 at 22:30 UTC
4e68ae5e59b24fad3865eb34421b36bef4751888
8 files changed
+10
-97
tests/lora/test_add_lora.py
+2
-19
@@ -6,6 +6,8 @@ import pytest
6
7
import vllm.envs as env
8
from vllm.engine.arg_utils import AsyncEngineArgs
9
+from vllm.entrypoints.openai.api_server import (
10
+ build_async_engine_client_from_engine_args)
11
from vllm.inputs import TextPrompt
12
from vllm.lora.request import LoRARequest
13
from vllm.sampling_params import SamplingParams
@@ -16,14 +18,6 @@ LORA_RANK = 64
18
DEFAULT_MAX_LORAS = 4 * 3
19
20
19
-@pytest.fixture(autouse=True)
20
-def v1(run_with_both_engines_lora):
21
- # Simple autouse wrapper to run both engines for each test
22
- # This can be promoted up to conftest.py to run for every
23
- # test in a package
24
- pass
25
-
26
-
21
def get_lora_requests(lora_path) -> list[LoRARequest]:
22
lora_requests: list[LoRARequest] = [
23
LoRARequest(lora_name=f"{i}", lora_int_id=i, lora_path=lora_path)
@@ -88,17 +82,6 @@ async def test_add_lora(chatglm3_lora_files):
82
trust_remote_code=True,
83
enforce_eager=True)
84
91
- # The run_with_both_engines_lora fixture sets up the `VLLM_USE_V1`
92
- # environment variable. reload vllm.enging.async_llm_engine as
93
- # vllm.engine.async_llm_engine.AsyncLLMEgnine changes depending on the
94
- # env var.
95
- import importlib
96
-
97
- import vllm.engine.async_llm_engine
98
- importlib.reload(vllm.engine.async_llm_engine)
99
- from vllm.entrypoints.openai.api_server import (
100
- build_async_engine_client_from_engine_args)
101
-
85
# split lora_requests into 3 parts
86
part_size = len(lora_requests) // 3
87
dummy_run_requests = lora_requests[:part_size]
tests/lora/test_chatglm3_tp.py
-10
@@ -1,7 +1,5 @@
1
# SPDX-License-Identifier: Apache-2.0
2
3
-import pytest
4
-
3
import vllm
4
from vllm.lora.request import LoRARequest
5
@@ -18,14 +16,6 @@ EXPECTED_LORA_OUTPUT = [
16
]
17
18
21
-@pytest.fixture(autouse=True)
22
-def v1(run_with_both_engines_lora):
23
- # Simple autouse wrapper to run both engines for each test
24
- # This can be promoted up to conftest.py to run for every
25
- # test in a package
26
- pass
27
-
28
-
19
def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int) -> list[str]:
20
prompts = [
21
PROMPT_TEMPLATE.format(query="How many singers do we have?"),
tests/lora/test_llama_tp.py
-8
@@ -33,14 +33,6 @@ EXPECTED_LORA_OUTPUT = [
33
]
34
35
36
-@pytest.fixture(autouse=True)
37
-def v1(run_with_both_engines_lora):
38
- # Simple autouse wrapper to run both engines for each test
39
- # This can be promoted up to conftest.py to run for every
40
- # test in a package
41
- pass
42
-
43
-
36
def do_sample(llm: vllm.LLM,
37
lora_path: str,
38
lora_id: int,
tests/lora/test_lora_functions.py
+8
-26
@@ -2,26 +2,24 @@
2
"""
3
Script to test add_lora, remove_lora, pin_lora, list_loras functions.
4
"""
5
-
6
-import os
7
-
5
import pytest
6
7
from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
8
from vllm.engine.llm_engine import LLMEngine
9
+from vllm.entrypoints.openai.api_server import (
10
+ build_async_engine_client_from_engine_args)
11
from vllm.lora.request import LoRARequest
12
13
MODEL_PATH = "meta-llama/Llama-2-7b-hf"
14
LORA_MODULE_PATH = "yard1/llama-2-7b-sql-lora-test"
15
LORA_RANK = 8
16
18
-
19
-@pytest.fixture(autouse=True)
20
-def v1(run_with_both_engines_lora):
21
- # Simple autouse wrapper to run both engines for each test
22
- # This can be promoted up to conftest.py to run for every
23
- # test in a package
24
- pass
17
+# @pytest.fixture(autouse=True)
18
+# def v1(run_with_both_engines_lora):
19
+# # Simple autouse wrapper to run both engines for each test
20
+# # This can be promoted up to conftest.py to run for every
21
+# # test in a package
22
+# pass
23
24
25
def make_lora_request(lora_id: int):
@@ -79,22 +77,6 @@ def test_lora_functions_sync():
77
@pytest.mark.asyncio
78
async def test_lora_functions_async():
79
82
- if os.getenv("VLLM_USE_V1") == "0":
83
- pytest.skip(
84
- reason=
85
- "V0 AsyncLLMEngine does not expose remove/list/pin LoRA functions")
86
-
87
- # The run_with_both_engines_lora fixture sets up the `VLLM_USE_V1`
88
- # environment variable. reload vllm.enging.async_llm_engine as
89
- # vllm.engine.async_llm_engine.AsyncLLMEgnine changes depending on the
90
- # env var.
91
- import importlib
92
-
93
- import vllm.engine.async_llm_engine
94
- importlib.reload(vllm.engine.async_llm_engine)
95
- from vllm.entrypoints.openai.api_server import (
96
- build_async_engine_client_from_engine_args)
97
-
80
max_loras = 4
81
engine_args = AsyncEngineArgs(model=MODEL_PATH,
82
enable_lora=True,
tests/lora/test_mixtral.py
-8
@@ -10,14 +10,6 @@ from vllm.platforms import current_platform
10
MODEL_PATH = "mistralai/Mixtral-8x7B-Instruct-v0.1"
11
12
13
-@pytest.fixture(autouse=True)
14
-def v1(run_with_both_engines_lora):
15
- # Simple autouse wrapper to run both engines for each test
16
- # This can be promoted up to conftest.py to run for every
17
- # test in a package
18
- pass
19
-
20
-
13
def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int,
14
prompts: list[str]) -> list[str]:
15
tests/lora/test_quant_model.py
-8
@@ -37,14 +37,6 @@ else:
37
]
38
39
40
-@pytest.fixture(autouse=True)
41
-def v1(run_with_both_engines_lora):
42
- # Simple autouse wrapper to run both engines for each test
43
- # This can be promoted up to conftest.py to run for every
44
- # test in a package
45
- pass
46
-
47
-
40
def do_sample(llm: vllm.LLM,
41
lora_path: str,
42
lora_id: int,
tests/lora/test_qwen2vl.py
-8
@@ -13,14 +13,6 @@ from vllm.platforms import current_platform
13
from vllm.sampling_params import BeamSearchParams
14
15
16
-@pytest.fixture(autouse=not current_platform.is_cpu())
17
-def v1(run_with_both_engines_lora):
18
- # Simple autouse wrapper to run both engines for each test
19
- # This can be promoted up to conftest.py to run for every
20
- # test in a package
21
- pass
22
-
23
-
16
@dataclass
17
class TestConfig:
18
model_path: str
tests/lora/test_worker.py
-10
@@ -6,8 +6,6 @@ import tempfile
6
from typing import Union
7
from unittest.mock import patch
8
9
-import pytest
10
-
9
import vllm.envs as envs
10
from vllm.config import (CacheConfig, DeviceConfig, LoadConfig, LoRAConfig,
11
ModelConfig, ParallelConfig, SchedulerConfig,
@@ -18,14 +16,6 @@ from vllm.v1.worker.gpu_worker import Worker as V1Worker
16
from vllm.worker.worker import Worker
17
18
21
-@pytest.fixture(autouse=True)
22
-def v1(run_with_both_engines_lora):
23
- # Simple autouse wrapper to run both engines for each test
24
- # This can be promoted up to conftest.py to run for every
25
- # test in a package
26
- pass
27
-
28
-
19
@patch.dict(os.environ, {"RANK": "0"})
20
def test_worker_apply_lora(sql_lora_files):
21