Start moving ray internal files to _private module (#10994)

This commit is contained in:
Eric Liang
2020-09-24 22:46:35 -07:00
committed by GitHub
parent 3b6fe72029
commit 609c1b8acd
39 changed files with 1825 additions and 1831 deletions
+3 -2
View File
@@ -113,7 +113,8 @@ class TestSyncFunctionality(unittest.TestCase):
}).trials
with patch.object(CommandBasedClient, "_execute") as mock_fn:
with patch("ray.services.get_node_ip_address") as mock_sync:
with patch(
"ray._private.services.get_node_ip_address") as mock_sync:
sync_config = tune.SyncConfig(
sync_to_driver="echo {source} {target}")
mock_sync.return_value = "0.0.0.0"
@@ -209,7 +210,7 @@ class TestSyncFunctionality(unittest.TestCase):
test_file_path = os.path.join(trial.logdir, "test.log2")
self.assertFalse(os.path.exists(test_file_path))
with patch("ray.services.get_node_ip_address") as mock_sync:
with patch("ray._private.services.get_node_ip_address") as mock_sync:
mock_sync.return_value = "0.0.0.0"
sync_config = tune.SyncConfig(sync_to_driver=sync_func_driver)
[trial] = tune.run(
+1 -1
View File
@@ -289,7 +289,7 @@ class Trainable:
return ""
def get_current_ip(self):
self._local_ip = ray.services.get_node_ip_address()
self._local_ip = ray._private.services.get_node_ip_address()
return self._local_ip
def train(self):
+1 -1
View File
@@ -8,7 +8,7 @@ import traceback
import types
import ray.cloudpickle as cloudpickle
from ray.services import get_node_ip_address
from ray._private.services import get_node_ip_address
from ray.tune import TuneError
from ray.tune.stopper import NoopStopper
from ray.tune.progress_reporter import trial_progress_str