Skip to content

Commit ac92dde

Browse files
committed
[V1][Metrics] Fix docs build
``` docs/source/serving/engine_args.md:14: ERROR: Failed to import "_engine_args_parser" from "vllm.engine.arg_utils". No module named 'prometheus_client' ``` Signed-off-by: Mark McLoughlin <markmc@redhat.com>
1 parent 9ebc784 commit ac92dde

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vllm/entrypoints/llm.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import warnings
55
from collections.abc import Sequence
66
from contextlib import contextmanager
7-
from typing import Any, Callable, ClassVar, Optional, Union, cast, overload
7+
from typing import (TYPE_CHECKING, Any, Callable, ClassVar, Optional, Union,
8+
cast, overload)
89

910
import cloudpickle
1011
import torch.nn as nn
@@ -46,7 +47,9 @@
4647
from vllm.usage.usage_lib import UsageContext
4748
from vllm.utils import (Counter, Device, deprecate_args, deprecate_kwargs,
4849
is_list_of)
49-
from vllm.v1.metrics.reader import Metric
50+
51+
if TYPE_CHECKING:
52+
from vllm.v1.metrics.reader import Metric
5053

5154
logger = init_logger(__name__)
5255

@@ -1299,7 +1302,7 @@ def wake_up(self, tags: Optional[list[str]] = None):
12991302
"""
13001303
self.llm_engine.wake_up(tags)
13011304

1302-
def get_metrics(self) -> list[Metric]:
1305+
def get_metrics(self) -> list["Metric"]:
13031306
"""Return a snapshot of aggregated metrics from Prometheus.
13041307
13051308
Returns:

0 commit comments

Comments
 (0)