mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 06:07:14 +08:00
Start moving ray internal files to _private module (#10994)
This commit is contained in:
@@ -3,7 +3,7 @@ import json
|
||||
import os
|
||||
|
||||
import ray
|
||||
import ray.services
|
||||
import ray._private.services
|
||||
from ray.util.sgd import utils
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -148,7 +148,7 @@ class TFRunner:
|
||||
|
||||
def get_node_ip(self):
|
||||
"""Returns the IP address of the current node."""
|
||||
return ray.services.get_node_ip_address()
|
||||
return ray._private.services.get_node_ip_address()
|
||||
|
||||
def find_free_port(self):
|
||||
"""Finds a free port on the current node."""
|
||||
|
||||
@@ -184,7 +184,7 @@ def clear_dummy_actor():
|
||||
|
||||
|
||||
def reserve_resources(num_cpus, num_gpus, retries=20):
|
||||
ip = ray.services.get_node_ip_address()
|
||||
ip = ray._private.services.get_node_ip_address()
|
||||
|
||||
reserved_cuda_device = None
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_address():
|
||||
ip = ray.services.get_node_ip_address()
|
||||
ip = ray._private.services.get_node_ip_address()
|
||||
port = find_free_port()
|
||||
return f"tcp://{ip}:{port}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user