Skip to content

Commit 6538497

Browse files
committed
Separate LLM and OpenAI entrypoints tests by directory
1 parent 3b752a6 commit 6538497

16 files changed

+12
-43
lines changed

.buildkite/test-pipeline.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ steps:
8383
mirror_hardwares: [amd]
8484

8585
commands:
86-
- pytest -v -s entrypoints -m llm
87-
- pytest -v -s entrypoints -m openai
86+
- pytest -v -s entrypoints/llm
87+
- pytest -v -s entrypoints/openai
8888

8989
- label: Examples Test
9090
working_dir: "/vllm-workspace/examples"

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,5 @@ skip_gitignore = true
6969
[tool.pytest.ini_options]
7070
markers = [
7171
"skip_global_cleanup",
72-
"llm: run tests for vLLM API only",
73-
"openai: run tests for OpenAI API only",
7472
"vlm: run tests for vision language models only",
7573
]

tests/entrypoints/llm/__init__.py

Whitespace-only changes.

tests/entrypoints/test_llm_encode.py renamed to tests/entrypoints/llm/test_encode.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from vllm import LLM, EmbeddingRequestOutput, PoolingParams
77

8-
from ..conftest import cleanup
8+
from ...conftest import cleanup
99

1010
MODEL_NAME = "intfloat/e5-mistral-7b-instruct"
1111

@@ -25,8 +25,6 @@
2525
[1000, 1003, 1001, 1002],
2626
]
2727

28-
pytestmark = pytest.mark.llm
29-
3028

3129
@pytest.fixture(scope="module")
3230
def llm():

tests/entrypoints/test_llm_generate.py renamed to tests/entrypoints/llm/test_generate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from vllm import LLM, RequestOutput, SamplingParams
77

8-
from ..conftest import cleanup
8+
from ...conftest import cleanup
99

1010
MODEL_NAME = "facebook/opt-125m"
1111

@@ -23,8 +23,6 @@
2323
[0, 3, 1, 2],
2424
]
2525

26-
pytestmark = pytest.mark.llm
27-
2826

2927
@pytest.fixture(scope="module")
3028
def llm():

tests/entrypoints/test_llm_generate_multiple_loras.py renamed to tests/entrypoints/llm/test_generate_multiple_loras.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from vllm import LLM
88
from vllm.lora.request import LoRARequest
99

10-
from ..conftest import cleanup
10+
from ...conftest import cleanup
1111

1212
MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta"
1313

@@ -20,8 +20,6 @@
2020

2121
LORA_NAME = "typeof/zephyr-7b-beta-lora"
2222

23-
pytestmark = pytest.mark.llm
24-
2523

2624
@pytest.fixture(scope="module")
2725
def llm():

tests/entrypoints/openai/__init__.py

Whitespace-only changes.

tests/entrypoints/test_openai_chat.py renamed to tests/entrypoints/openai/test_chat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from huggingface_hub import snapshot_download
1515
from openai import BadRequestError
1616

17-
from ..utils import VLLM_PATH, RemoteOpenAIServer
17+
from ...utils import VLLM_PATH, RemoteOpenAIServer
1818

1919
# any model with a chat template should work here
2020
MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta"
@@ -69,8 +69,6 @@
6969
"Swift", "Kotlin"
7070
]
7171

72-
pytestmark = pytest.mark.openai
73-
7472

7573
@pytest.fixture(scope="module")
7674
def zephyr_lora_files():

tests/entrypoints/test_openai_completion.py renamed to tests/entrypoints/openai/test_completion.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from vllm.transformers_utils.tokenizer import get_tokenizer
1818

19-
from ..utils import RemoteOpenAIServer
19+
from ...utils import RemoteOpenAIServer
2020

2121
# any model with a chat template should work here
2222
MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta"
@@ -71,8 +71,6 @@
7171
"Swift", "Kotlin"
7272
]
7373

74-
pytestmark = pytest.mark.openai
75-
7674

7775
@pytest.fixture(scope="module")
7876
def zephyr_lora_files():

tests/entrypoints/test_openai_embedding.py renamed to tests/entrypoints/openai/test_embedding.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import pytest
33
import ray
44

5-
from ..utils import RemoteOpenAIServer
5+
from ...utils import RemoteOpenAIServer
66

77
EMBEDDING_MODEL_NAME = "intfloat/e5-mistral-7b-instruct"
88

9-
pytestmark = pytest.mark.openai
10-
119

1210
@pytest.fixture(scope="module")
1311
def ray_ctx():

0 commit comments

Comments
 (0)