Fix KV event publisher bind conflict under PP (#29044)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user