2025-12-16 23:41:42 +08:00
|
|
|
import asyncio
|
|
|
|
|
|
2026-02-09 19:17:32 +08:00
|
|
|
from vllm_omni.metrics import OrchestratorAggregator
|
2026-01-08 20:25:04 +08:00
|
|
|
|
2025-12-16 23:41:42 +08:00
|
|
|
|
|
|
|
|
class ClientRequestState:
|
|
|
|
|
"""Tracks the state of an individual request in the orchestrator."""
|
|
|
|
|
|
2026-05-30 02:59:42 -06:00
|
|
|
def __init__(
|
|
|
|
|
self,
|
|
|
|
|
request_id: str,
|
|
|
|
|
external_request_id: str | None = None,
|
|
|
|
|
queue: asyncio.Queue | None = None,
|
|
|
|
|
):
|
2025-12-16 23:41:42 +08:00
|
|
|
self.request_id = request_id
|
2026-05-30 02:59:42 -06:00
|
|
|
self.external_request_id = external_request_id
|
2025-12-16 23:41:42 +08:00
|
|
|
self.stage_id: int | None = None
|
|
|
|
|
self.queue = queue if queue is not None else asyncio.Queue()
|
2026-02-09 19:17:32 +08:00
|
|
|
self.metrics: OrchestratorAggregator | None = None
|