Fix KV event publisher bind conflict under PP (#29044)

This commit is contained in:
ziang663
2026-06-26 12:50:49 +08:00
committed by GitHub
parent 8fd6e9e017
commit ff89e0fe9a
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -454,6 +454,7 @@ class Scheduler(
enable_metrics=self.server_args.enable_metrics,
enable_kv_cache_events=bool(
self.server_args.kv_events_config
and self.ps.pp_rank == 0
and self.ps.attn_tp_rank == 0
and self.ps.attn_cp_rank == 0
),
@@ -59,7 +59,10 @@ class SchedulerKvEventsPublisher:
def init_kv_events(self, kv_events_config: Optional[str]):
self.enable_kv_cache_events = bool(
kv_events_config and self.ps.attn_tp_rank == 0 and self.ps.attn_cp_rank == 0
kv_events_config
and self.ps.pp_rank == 0
and self.ps.attn_tp_rank == 0
and self.ps.attn_cp_rank == 0
)
if self.enable_kv_cache_events:
@@ -1044,6 +1044,7 @@ class SchedulerMetricsCollector(_StatLoggerDIMixin):
)
enable_kv_cache_events = bool(
server_args.kv_events_config
and ps.pp_rank == 0
and ps.attn_tp_rank == 0
and ps.attn_cp_rank == 0
)