Skip to content

Commit 5a78f48

Browse files
committed
fix CI for missing of nixl_agent_config
Signed-off-by: Chendi Xue <Chendi.Xue@intel.com>
1 parent 77147bc commit 5a78f48

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,17 @@
5353
# Lazy import nixl_wrapper to avoid loading nixl_bindings if nixl is not used
5454
try:
5555
from nixl._api import nixl_agent as NixlWrapper
56-
from nixl._api import nixl_agent_config
5756
logger.info("NIXL is available")
5857
except ImportError:
5958
logger.warning("NIXL is not available")
6059
NixlWrapper = None
6160

61+
try:
62+
from nixl._api import nixl_agent_config
63+
except ImportError:
64+
nixl_agent_config = None
65+
logger.warning("NIXL agent config is not available")
66+
6267
# Supported platforms and types of kv transfer buffer.
6368
# {device: tuple of supported kv buffer types}
6469
_NIXL_SUPPORTED_DEVICE = {
@@ -455,7 +460,10 @@ def __init__(self, vllm_config: VllmConfig, engine_id: str):
455460
vllm_config.kv_transfer_config.get_from_extra_config(
456461
"backends", ["UCX"])
457462
# Agent.
458-
config = nixl_agent_config(backends=self.nixl_backends)
463+
non_ucx_backends = [b for b in self.nixl_backends if b != "UCX"]
464+
config = nixl_agent_config(backends=self.nixl_backends) if len(
465+
non_ucx_backends) > 0 and nixl_agent_config is not None else None
466+
459467
self.nixl_wrapper = NixlWrapper(str(uuid.uuid4()), config)
460468
# Map of engine_id -> {rank0: agent_name0, rank1: agent_name1..}.
461469
self._remote_agents: dict[EngineId, dict[int, str]] = defaultdict(dict)

0 commit comments

Comments
 (0)