Skip to content

Commit 1a9aeab

Browse files
authored
fix: Remove hard dep on kvbm (#4127)
1 parent 482a791 commit 1a9aeab

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

components/src/dynamo/vllm/main.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import Optional
99

1010
import uvloop
11-
from kvbm.vllm_integration.consolidator_config import get_consolidator_endpoints
1211
from prometheus_client import REGISTRY
1312
from vllm.distributed.kv_events import ZmqEventPublisher
1413
from vllm.usage.usage_lib import UsageContext
@@ -216,7 +215,18 @@ def setup_vllm_engine(config, stat_logger=None):
216215
# Set up consolidator endpoints if KVBM is enabled
217216
consolidator_endpoints = None
218217
if config.has_connector("kvbm"):
219-
consolidator_endpoints = get_consolidator_endpoints(vllm_config)
218+
try:
219+
from kvbm.vllm_integration.consolidator_config import (
220+
get_consolidator_endpoints,
221+
)
222+
223+
consolidator_endpoints = get_consolidator_endpoints(vllm_config)
224+
except Exception as e:
225+
logger.warning(
226+
f"KVBM connector is enabled but failed to get consolidator endpoints: {e}. "
227+
"Continuing without KV event consolidation. "
228+
"Ensure 'kvbm' package is installed if this feature is needed."
229+
)
220230
vllm_config.consolidator_endpoints = consolidator_endpoints
221231

222232
factory = []

0 commit comments

Comments
 (0)