python/ray/tune/tests/test_sync.py
def testNoSync(self):
        """Sync should not run on a single node."""

        def sync_func(source, target):
            pass

        sync_config = tune.SyncConfig(syncer=sync_func)

        with patch.object(CommandBasedClient, "_execute") as mock_sync:
            [trial] = tune.run(
                "__fake",
                name="foo",
                max_failures=0,
                stop={"training_iteration": 1},
                sync_config=sync_config,
            ).trials
            self.assertEqual(mock_sync.call_count, 0)
Sync should not run on a single node.
Sync should not run on a single node.
Sync should not run on a single node .
def testNoSync(self):
        def sync_func(source, target):
            pass
        sync_config = tune.SyncConfig(syncer=sync_func)
        with patch.object(CommandBasedClient, "_execute") as mock_sync:
            [trial] = tune.run(
                "__fake",
                name="foo",
                max_failures=0,
                stop={"training_iteration": 1},
                sync_config=sync_config,
            ).trials
            self.assertEqual(mock_sync.call_count, 0)
def testNoSync ( self ) : def sync_func ( source , target ) : pass sync_config = tune . SyncConfig ( syncer = sync_func ) with patch . object ( CommandBasedClient , "_execute" ) as mock_sync : [ trial ] = tune . run ( "__fake" , name = "foo" , max_failures = 0 , stop = { "training_iteration" : 1 } , sync_config = sync_config , ) . trials self . assertEqual ( mock_sync . call_count , 0 )
Sync should not run on a single node.
Sync should not run on a single node .
"""Sync should not run on a single node."""
self