vllm.v1.metrics.loggers
¶
Classes:
-
AggregateStatLoggerBase–Abstract base class for loggers that
-
LoggingStatLogger– -
PrometheusStatLogger– -
StatLoggerBase–Interface for logging metrics.
-
StatLoggerManager–StatLoggerManager:
AggregateStatLoggerBase
¶
Bases: StatLoggerBase
Abstract base class for loggers that aggregate across multiple DP engines.
Methods:
-
record_admission_rejection–Record a frontend admission rejection. Optional for custom loggers.
record_admission_rejection(reason)
¶
Record a frontend admission rejection. Optional for custom loggers.
LoggingStatLogger
¶
Bases: StatLoggerBase
Methods:
-
record–Log Stats to standard output.
record(scheduler_stats, iteration_stats, mm_cache_stats=None, engine_idx=0)
¶
Log Stats to standard output.
PrometheusStatLogger
¶
Bases: AggregateStatLoggerBase
Methods:
-
record–Log to prometheus.
record(scheduler_stats, iteration_stats, mm_cache_stats=None, engine_idx=0)
¶
Log to prometheus.
StatLoggerBase
¶
Bases: ABC
Interface for logging metrics.
API users may define custom loggers that implement this interface.
However, note that the SchedulerStats and IterationStats classes
are not considered stable interfaces and may change in future versions.
StatLoggerManager
¶
StatLoggerManager: Logging happens at the level of the EngineCore (per scheduler). * DP: >1 EngineCore per AsyncLLM - loggers for each EngineCore. * With Local Logger, just make N copies for N EngineCores. * With Prometheus, we need a single logger with N "labels"
This class abstracts away this implementation detail from the AsyncLLM, allowing the AsyncLLM to just call .record() and .log() to a simple interface.
Methods:
-
record_admission_rejection–Record one frontend admission rejection on aggregate loggers.
record_admission_rejection(reason)
¶
Record one frontend admission rejection on aggregate loggers.