[KV-Events] Fix kv events events publishing for CP (#22983)

Signed-off-by: Vladislav Nosivskoy <vladnosiv@gmail.com>
This commit is contained in:
Vladislav Nosivskoy
2026-04-20 17:34:38 +08:00
committed by GitHub
parent bea4c895c1
commit 4028a73c10
2 changed files with 135 additions and 1 deletions
@@ -171,7 +171,9 @@ class SchedulerMetricsMixin:
)
def init_kv_events(self: Scheduler, kv_events_config: Optional[str]):
self.enable_kv_cache_events = bool(kv_events_config and self.attn_tp_rank == 0)
self.enable_kv_cache_events = bool(
kv_events_config and self.attn_tp_rank == 0 and self.attn_cp_rank == 0
)
if self.enable_kv_cache_events:
self.kv_event_publisher = EventPublisherFactory.create(