Skip to content

Commit 4e68ae5

Browse files
authored
[CI/Build] Remove V0 LoRA test (#19066)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
1 parent 4e88723 commit 4e68ae5

File tree

8 files changed

+10
-97
lines changed

8 files changed

+10
-97
lines changed

tests/lora/test_add_lora.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import vllm.envs as env
88
from vllm.engine.arg_utils import AsyncEngineArgs
9+
from vllm.entrypoints.openai.api_server import (
10+
build_async_engine_client_from_engine_args)
911
from vllm.inputs import TextPrompt
1012
from vllm.lora.request import LoRARequest
1113
from vllm.sampling_params import SamplingParams
@@ -16,14 +18,6 @@
1618
DEFAULT_MAX_LORAS = 4 * 3
1719

1820

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-
2721
def get_lora_requests(lora_path) -> list[LoRARequest]:
2822
lora_requests: list[LoRARequest] = [
2923
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):
8882
trust_remote_code=True,
8983
enforce_eager=True)
9084

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-
10285
# split lora_requests into 3 parts
10386
part_size = len(lora_requests) // 3
10487
dummy_run_requests = lora_requests[:part_size]

tests/lora/test_chatglm3_tp.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
import pytest
4-
53
import vllm
64
from vllm.lora.request import LoRARequest
75

@@ -18,14 +16,6 @@
1816
]
1917

2018

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-
2919
def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int) -> list[str]:
3020
prompts = [
3121
PROMPT_TEMPLATE.format(query="How many singers do we have?"),

tests/lora/test_llama_tp.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,6 @@
3333
]
3434

3535

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-
4436
def do_sample(llm: vllm.LLM,
4537
lora_path: str,
4638
lora_id: int,

tests/lora/test_lora_functions.py

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,24 @@
22
"""
33
Script to test add_lora, remove_lora, pin_lora, list_loras functions.
44
"""
5-
6-
import os
7-
85
import pytest
96

107
from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
118
from vllm.engine.llm_engine import LLMEngine
9+
from vllm.entrypoints.openai.api_server import (
10+
build_async_engine_client_from_engine_args)
1211
from vllm.lora.request import LoRARequest
1312

1413
MODEL_PATH = "meta-llama/Llama-2-7b-hf"
1514
LORA_MODULE_PATH = "yard1/llama-2-7b-sql-lora-test"
1615
LORA_RANK = 8
1716

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
2523

2624

2725
def make_lora_request(lora_id: int):
@@ -79,22 +77,6 @@ def run_check(fn, args, expected: list):
7977
@pytest.mark.asyncio
8078
async def test_lora_functions_async():
8179

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-
9880
max_loras = 4
9981
engine_args = AsyncEngineArgs(model=MODEL_PATH,
10082
enable_lora=True,

tests/lora/test_mixtral.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010
MODEL_PATH = "mistralai/Mixtral-8x7B-Instruct-v0.1"
1111

1212

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-
2113
def do_sample(llm: vllm.LLM, lora_path: str, lora_id: int,
2214
prompts: list[str]) -> list[str]:
2315

tests/lora/test_quant_model.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,6 @@ class ModelWithQuantization:
3737
]
3838

3939

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-
4840
def do_sample(llm: vllm.LLM,
4941
lora_path: str,
5042
lora_id: int,

tests/lora/test_qwen2vl.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
from vllm.sampling_params import BeamSearchParams
1414

1515

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-
2416
@dataclass
2517
class TestConfig:
2618
model_path: str

tests/lora/test_worker.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
from typing import Union
77
from unittest.mock import patch
88

9-
import pytest
10-
119
import vllm.envs as envs
1210
from vllm.config import (CacheConfig, DeviceConfig, LoadConfig, LoRAConfig,
1311
ModelConfig, ParallelConfig, SchedulerConfig,
@@ -18,14 +16,6 @@
1816
from vllm.worker.worker import Worker
1917

2018

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-
2919
@patch.dict(os.environ, {"RANK": "0"})
3020
def test_worker_apply_lora(sql_lora_files):
3121

0 commit comments

Comments
 (0)