Skip to content

Commit df441e9

Browse files
committed
fix: restore http metrics for V0 engine
by lazily importing prometheus_client in `vllm/v1/spec_decode/metrics.py`. closes #17406 Signed-off-by: David Xia <[email protected]>
1 parent 77073c7 commit df441e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm/v1/spec_decode/metrics.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from typing import Optional
55

66
import numpy as np
7-
import prometheus_client
87

98
from vllm.config import SpeculativeConfig
109
from vllm.logger import init_logger
@@ -116,6 +115,8 @@ class SpecDecodingProm:
116115

117116
def __init__(self, speculative_config: Optional[SpeculativeConfig],
118117
labelnames: list[str], labelvalues: list[str]):
118+
import prometheus_client
119+
119120
self.spec_decoding_enabled = speculative_config is not None
120121
if not self.spec_decoding_enabled:
121122
return

0 commit comments

Comments
 (0)