diff --git a/miles/backends/megatron_utils/actor.py b/miles/backends/megatron_utils/actor.py index 04c838e49c9..97b4d3b6027 100644 --- a/miles/backends/megatron_utils/actor.py +++ b/miles/backends/megatron_utils/actor.py @@ -59,7 +59,6 @@ from .replay_utils import register_replay_list_moe from .update_weight.common import named_params_and_buffers from .update_weight.update_weight_from_distributed.broadcast import UpdateWeightFromDistributed -from .update_weight.update_weight_from_distributed.p2p import UpdateWeightP2P from .update_weight.update_weight_from_tensor import UpdateWeightFromTensor if TYPE_CHECKING: @@ -261,6 +260,10 @@ def init( update_weight_cls = UpdateWeightFromDiskDelta else: + # Mooncake loads its RDMA shared libraries at import time. + # Other transfer modes must not require a compatible RDMA setup. + from .update_weight.update_weight_from_distributed.p2p import UpdateWeightP2P + update_weight_cls = UpdateWeightP2P self.weight_updater = update_weight_cls( self.args,