Fix EventPublisherFactory logic for disabled KV cache events (#27419)

Signed-off-by: Bradley <bradley.b.pitt@gmail.com>
This commit is contained in:
usberkeley
2025-10-24 05:00:01 +00:00
committed by GitHub
parent 85fee74b33
commit c528b9006a
2 changed files with 54 additions and 1 deletions
+5 -1
View File
@@ -353,7 +353,11 @@ class EventPublisherFactory:
cls, config: KVEventsConfig | None, data_parallel_rank: int = 0
) -> EventPublisher:
"""Create publisher from a config mapping."""
if config is None or config.publisher == "null":
if (
config is None
or not config.enable_kv_cache_events
or config.publisher == "null"
):
return NullEventPublisher()
config_dict = asdict(config)