diff --git a/slime/backends/fsdp_utils/update_weight_utils.py b/slime/backends/fsdp_utils/update_weight_utils.py index 4c0ce5478..f05432d16 100644 --- a/slime/backends/fsdp_utils/update_weight_utils.py +++ b/slime/backends/fsdp_utils/update_weight_utils.py @@ -192,7 +192,7 @@ def connect_rollout_engines( self._is_src_rank = dist.get_rank() == 0 if self._is_src_rank: self._group_name = "slime" - master_address = ray._private.services.get_node_ip_address() + master_address = ray.util.get_node_ip_address() with socket.socket() as sock: sock.bind(("", 0)) master_port = sock.getsockname()[1] diff --git a/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py b/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py index a8e50e0e4..1c1af15c6 100644 --- a/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py +++ b/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py @@ -247,7 +247,7 @@ def connect_rollout_engines_from_distributed( """ Create NCCL group: training rank 0 + all engine GPUs. Blocks until joined. """ - master_address = ray._private.services.get_node_ip_address() + master_address = ray.util.get_node_ip_address() with socket.socket() as sock: sock.bind(("", 0)) master_port = sock.getsockname()[1] diff --git a/slime/utils/misc.py b/slime/utils/misc.py index 5a0841568..ac9125430 100644 --- a/slime/utils/misc.py +++ b/slime/utils/misc.py @@ -56,7 +56,7 @@ def exec_command(cmd: str, capture_output: bool = False) -> str | None: def get_current_node_ip(): - address = ray._private.services.get_node_ip_address() + address = ray.util.get_node_ip_address() # strip ipv6 address address = address.strip("[]") return address