Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
pyv: ["3.11"]
pyv: ["3.12"]
vllm_version:
# - "" # skip the pypi version as it will not work on CPU
- "git+https://github.com/vllm-project/[email protected]"
- "git+https://github.com/vllm-project/[email protected].post2"
- "git+https://github.com/vllm-project/vllm@main"
- "git+https://github.com/opendatahub-io/vllm@main"

Expand Down
17 changes: 13 additions & 4 deletions src/vllm_tgis_adapter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
from typing import TYPE_CHECKING

from vllm.entrypoints.launcher import serve_http
from vllm.entrypoints.openai.api_server import (
init_app,
)
from vllm.entrypoints.openai.api_server import build_app
from vllm.logger import init_logger

try:
from vllm.entrypoints.openai.api_server import init_app
except ImportError: # vllm > 0.6.1.post2
from vllm.entrypoints.openai.api_server import init_app_state


if TYPE_CHECKING:
import argparse

Expand All @@ -27,7 +31,12 @@ async def run_http_server(
# modified copy of vllm.entrypoints.openai.api_server.run_server that
# allows passing of the engine

app = await init_app(engine, args) # type: ignore[arg-type]
try:
app = await init_app(engine, args) # type: ignore[arg-type]
except NameError: # vllm > 0.6.1.post2
app = build_app(args)
model_config = await engine.get_model_config()
init_app_state(engine, model_config, app.state, args)

serve_kwargs = {
"host": args.host,
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@pytest.fixture
def lora_available() -> bool:
# lora does not work on cpu
return not vllm.config.is_cpu()
return not vllm.config.current_platform.is_cpu()


@pytest.fixture
Expand Down