[Metrics][P/D] Add KV-fetch stage gauges for async KV loads (#58874)
Signed-off-by: Zijing Liu <liuzijing2014@gmail.com> Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Nick Hill
Claude Opus 5.5
parent
eec3c36a47
commit
d58da79de7
@@ -182,6 +182,16 @@ class SchedulerIterationDetails:
|
||||
is_dummy: bool = False
|
||||
|
||||
|
||||
KV_FETCH_WAITING_TO_START = "waiting_to_start"
|
||||
KV_FETCH_IN_PROGRESS = "in_progress"
|
||||
KV_FETCH_COMPLETED_WAITING = "completed_waiting"
|
||||
KV_FETCH_STAGES = (
|
||||
KV_FETCH_WAITING_TO_START,
|
||||
KV_FETCH_IN_PROGRESS,
|
||||
KV_FETCH_COMPLETED_WAITING,
|
||||
)
|
||||
|
||||
|
||||
@dataclass
|
||||
class SchedulerStats:
|
||||
"""Stats associated with the scheduler."""
|
||||
@@ -192,6 +202,8 @@ class SchedulerStats:
|
||||
# waiting requests deferred by transient constraints or a blocked status
|
||||
num_skipped_waiting_reqs: int = 0
|
||||
|
||||
num_kv_fetch_reqs_by_stage: dict[str, int] = field(default_factory=dict)
|
||||
|
||||
# These are used for internal DP load-balancing.
|
||||
step_counter: int = 0
|
||||
current_wave: int = 0
|
||||
|
||||
Reference in New Issue
Block a user