Skip to content

Commit ccb3323

Browse files
committed
[chore] Fix pre-commit on utils/metrics.py
1 parent 2b531dd commit ccb3323

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/utils/metrics.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from vllm.engine.metrics import SupportsMetricsInfo, build_1_2_5_buckets
3535
from vllm.version import __version__ as _VLLM_VERSION
3636

37+
3738
class TritonMetrics:
3839
def __init__(self, labels: List[str], max_model_len: int):
3940
# Initialize metric families
@@ -163,9 +164,11 @@ def __init__(self, labels: List[str], max_model_len: int):
163164
)
164165
)
165166
if _VLLM_VERSION < "0.6.3":
166-
self.histogram_best_of_request = self.histogram_best_of_request_family.Metric(
167-
labels=labels,
168-
buckets=[1, 2, 5, 10, 20],
167+
self.histogram_best_of_request = (
168+
self.histogram_best_of_request_family.Metric(
169+
labels=labels,
170+
buckets=[1, 2, 5, 10, 20],
171+
)
169172
)
170173
self.histogram_n_request = self.histogram_n_request_family.Metric(
171174
labels=labels,
@@ -254,7 +257,9 @@ def log(self, stats: VllmStats) -> None:
254257
(self.metrics.histogram_n_request, stats.n_requests),
255258
]
256259
if _VLLM_VERSION < "0.6.3":
257-
histogram_metrics.append((self.metrics.histogram_best_of_request, stats.best_of_requests))
260+
histogram_metrics.append(
261+
(self.metrics.histogram_best_of_request, stats.best_of_requests)
262+
)
258263
for metric, data in counter_metrics:
259264
self._log_counter(metric, data)
260265
for metric, data in histogram_metrics:

0 commit comments

Comments
 (0)