Skip to content

vllm_omni.metrics.transfer

OmniTransferMetrics — cross-stage transfer Prometheus families.

Four families with {model_name, from_stage, from_replica, to_stage, to_replica} labels. Each observe_*() call corresponds to one physical transfer event (one chunk hop from a sender replica to a receiver replica), so the Histogram tracks the distribution of physical transfers, not request-aggregated sums.

Data source: vllm_omni.metrics.stats.TransferEdgeStats accumulators in OrchestratorAggregator.record_transfer_tx / record_transfer_rx. The emit hook lives in stats.py; this module only registers the families and exposes the typed observe API.

OmniTransferMetrics

Per-(from, to) replica observe API for cross-stage transfers.

A single instance per pipeline; model_name is bound at init and every observe call carries it in the label set. Stage/replica are passed at observe time because the same instance serves all (from_stage, from_replica) -> (to_stage, to_replica) edges.

observe_in_flight_time

observe_in_flight_time(
    from_stage: int,
    from_replica: int,
    to_stage: int,
    to_replica: int,
    in_flight_time_s: float,
) -> None

observe_rx_time

observe_rx_time(
    from_stage: int,
    from_replica: int,
    to_stage: int,
    to_replica: int,
    rx_time_s: float,
) -> None

observe_size

observe_size(
    from_stage: int,
    from_replica: int,
    to_stage: int,
    to_replica: int,
    size_bytes: int,
) -> None

observe_tx_time

observe_tx_time(
    from_stage: int,
    from_replica: int,
    to_stage: int,
    to_replica: int,
    tx_time_s: float,
) -> None