vllm_omni.metrics.stats ¶
E2E_FIELDS module-attribute ¶
E2E_FIELDS = _build_field_defs(
RequestE2EStats, E2E_EXCLUDE, FIELD_TRANSFORMS
)
FIELD_TRANSFORMS module-attribute ¶
FIELD_TRANSFORMS: dict[
str, tuple[str, Callable[[Any], Any]]
] = {
"rx_transfer_bytes": (
"rx_transfer_kbytes",
lambda v: v / 1024.0,
),
"size_bytes": ("size_kbytes", lambda v: v / 1024.0),
"transfers_total_bytes": (
"transfers_total_kbytes",
lambda v: v / 1024.0,
),
}
STAGE_EXCLUDE module-attribute ¶
STAGE_EXCLUDE = {
"stage_stats",
"stage_id",
"request_id",
"rx_transfer_bytes",
"rx_decode_time_ms",
"rx_in_flight_time_ms",
"final_output_type",
"pipeline_timings",
}
STAGE_FIELDS module-attribute ¶
STAGE_FIELDS = _build_field_defs(
StageRequestStats, STAGE_EXCLUDE, FIELD_TRANSFORMS
)
TRANSFER_EXCLUDE module-attribute ¶
TRANSFER_FIELDS module-attribute ¶
TRANSFER_FIELDS = _build_field_defs(
TransferEdgeStats, TRANSFER_EXCLUDE, FIELD_TRANSFORMS
)
OrchestratorAggregator ¶
transfer_events instance-attribute ¶
accumulate_diffusion_metrics ¶
on_finalize_request ¶
on_forward ¶
on_forward(
from_stage: int,
to_stage: int,
req_id: Any,
size_bytes: int,
tx_ms: float,
used_shm: bool,
) -> None
on_stage_metrics ¶
on_stage_metrics(
stage_id: int,
req_id: Any,
metrics: StageRequestStats,
final_output_type: str | None = None,
) -> None
process_stage_metrics ¶
process_stage_metrics(
*,
result: dict[str, Any],
stage_type: str,
stage_id: int,
req_id: str,
engine_outputs: Any,
finished: bool,
final_output_type: str | None,
output_to_yield: Any | None,
) -> None
Process and record stage metrics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result | dict[str, Any] | Result dict containing metrics from stage | required |
stage_type | str | Type of the stage (e.g., 'llm', 'diffusion') | required |
stage_id | int | Stage identifier | required |
req_id | str | Request identifier | required |
engine_outputs | Any | Engine output object | required |
finished | bool | Whether stage processing is finished | required |
final_output_type | str | None | Type of final output (e.g., 'text', 'audio') | required |
output_to_yield | Any | None | Output object to attach metrics to | required |