mirror of
https://github.com/wassname/ray.git
synced 2026-08-17 11:25:34 +08:00
[tune] Refactor syncer (#6496)
* Refactor syncer and log_sync. * Fix documentation. * Remove delete from api * Rename to get_node_syncer
This commit is contained in:
committed by
Richard Liaw
parent
7a24144bfd
commit
81197e47c7
@@ -30,7 +30,7 @@ class TestSyncFunctionality(unittest.TestCase):
|
||||
ray.shutdown()
|
||||
_register_all() # re-register the evicted objects
|
||||
|
||||
@patch("ray.tune.syncer.S3_PREFIX", "test")
|
||||
@patch("ray.tune.sync_client.S3_PREFIX", "test")
|
||||
def testNoUploadDir(self):
|
||||
"""No Upload Dir is given."""
|
||||
with self.assertRaises(AssertionError):
|
||||
@@ -45,7 +45,7 @@ class TestSyncFunctionality(unittest.TestCase):
|
||||
"sync_to_cloud": "echo {source} {target}"
|
||||
}).trials
|
||||
|
||||
@patch("ray.tune.syncer.S3_PREFIX", "test")
|
||||
@patch("ray.tune.sync_client.S3_PREFIX", "test")
|
||||
def testCloudProperString(self):
|
||||
with self.assertRaises(ValueError):
|
||||
[trial] = tune.run(
|
||||
@@ -120,7 +120,7 @@ class TestSyncFunctionality(unittest.TestCase):
|
||||
"sync_to_driver": "ls {source}"
|
||||
}).trials
|
||||
|
||||
with patch.object(CommandBasedClient, "execute") as mock_fn:
|
||||
with patch.object(CommandBasedClient, "_execute") as mock_fn:
|
||||
with patch("ray.services.get_node_ip_address") as mock_sync:
|
||||
mock_sync.return_value = "0.0.0.0"
|
||||
[trial] = tune.run(
|
||||
@@ -198,7 +198,7 @@ class TestSyncFunctionality(unittest.TestCase):
|
||||
def sync_func(source, target):
|
||||
pass
|
||||
|
||||
with patch.object(CommandBasedClient, "execute") as mock_sync:
|
||||
with patch.object(CommandBasedClient, "_execute") as mock_sync:
|
||||
[trial] = tune.run(
|
||||
"__fake",
|
||||
name="foo",
|
||||
|
||||
Reference in New Issue
Block a user