Skip to content

Commit

Permalink
misc: code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sylviayangyy committed Oct 28, 2024
1 parent 4a255dd commit 0d67968
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions vllm/engine/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def log(self, stats: Stats) -> None:
stats.to_log(self)

def log_general_stats(self, stats: GeneralStats):
"""Logs GeneralStats to prometheus and tracked stats every iteration."""
"""Logs GeneralStats"""
# Log to prometheus.
self._log_prometheus_general(stats)

Expand Down Expand Up @@ -634,7 +634,7 @@ def log_general_stats(self, stats: GeneralStats):
self.spec_decode_metrics = None

def log_embedding_stats(self, stats: EmbeddingStats):
"""Logs EmbeddingStats to prometheus and tracked stats every iteration."""
"""Logs EmbeddingStats"""
# Log to prometheus.
self._log_prometheus_embedding(stats)

Expand Down
6 changes: 4 additions & 2 deletions vllm/engine/metrics_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
@dataclass
class Stats:
"""Created by LLMEngine for use by StatLogger.
This is the base class for Stats, implementing specified Stats according to needs."""
This is the base class for Stats, implementing specified Stats
according to needs."""

@abstractmethod
def to_log(self, logger: "StatLoggerBase"):
Expand Down Expand Up @@ -135,5 +136,6 @@ def info(self, type: str, obj: SupportsMetricsInfo) -> None:
def maybe_update_spec_decode_metrics(self, stats: Stats):
"""Save spec decode metrics (since they are unlikely
to be emitted at same time as log interval)."""
if isinstance(stats, GeneralStats) and stats.spec_decode_metrics is not None:
if (isinstance(stats, GeneralStats)
and stats.spec_decode_metrics is not None):
self.spec_decode_metrics = stats.spec_decode_metrics

0 comments on commit 0d67968

Please sign in to comment.