Skip to content

Commit

Permalink
deps: bump vllm to vllm>=0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrifiro committed Jul 10, 2024
1 parent 3fa9edb commit 1c9ef1b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pyv: ["3.11"]
vllm_version:
# - "" # skip the pypi version as it will not work on CPU
- "git+https://github.com/vllm-project/vllm@v0.5.0.post1"
- "git+https://github.com/vllm-project/vllm@v0.5.1"
- "git+https://github.com/vllm-project/vllm@main"
- "git+https://github.com/opendatahub-io/vllm@main"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
requires-python = ">=3.9"
dynamic = ["version"]
dependencies = [
"vllm>=0.5.0",
"vllm>=0.5.1",
"prometheus_client==0.20.0",
"grpcio==1.62.2",
"grpcio-health-checking==1.62.2",
Expand Down
21 changes: 5 additions & 16 deletions src/vllm_tgis_adapter/grpc/grpc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,22 +191,11 @@ async def post_init(self) -> None:
assert self.tokenizer is not None

# Swap in the special TGIS stats logger
if hasattr(self.engine.engine, "stat_logger"):
# vllm <=0.5.1
tgis_stats_logger = TGISStatLogger(
vllm_stat_logger=self.engine.engine.stat_logger,
max_sequence_len=self.config.max_model_len,
)
self.engine.engine.stat_logger = tgis_stats_logger
elif hasattr(self.engine.engine, "stat_loggers"):
# vllm>=0.5.2
tgis_stats_logger = TGISStatLogger(
vllm_stat_logger=self.engine.engine.stat_loggers["prometheus"],
max_sequence_len=self.config.max_model_len,
)
self.engine.engine.stat_loggers["prometheus"] = tgis_stats_logger
else:
raise ValueError("engine doesn't have any known loggers.")
tgis_stats_logger = TGISStatLogger(
vllm_stat_logger=self.engine.engine.stat_loggers["prometheus"],
max_sequence_len=self.config.max_model_len,
)
self.engine.engine.stat_loggers["prometheus"] = tgis_stats_logger

self.health_servicer.set(
self.SERVICE_NAME,
Expand Down
8 changes: 1 addition & 7 deletions src/vllm_tgis_adapter/tgis_utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@

from prometheus_client import Counter, Gauge, Histogram
from vllm import RequestOutput
from vllm.engine.metrics import Stats

try:
from vllm.engine.metrics import StatLoggerBase
except ImportError:
# vllm<=0.5.1
from vllm.engine.metrics import StatLogger as StatLoggerBase
from vllm.engine.metrics import StatLoggerBase, Stats

from vllm_tgis_adapter.grpc.pb.generation_pb2 import (
BatchedTokenizeRequest,
Expand Down

0 comments on commit 1c9ef1b

Please sign in to comment.