Change ray.worker.cleanup -> ray.shutdown and improve API documentation. (#2374)

* Change ray.worker.cleanup -> ray.shutdown and improve API documentation.

* Deprecate ray.worker.cleanup() gracefully.

* Fix linting
This commit is contained in:
Robert Nishihara
2018-07-12 12:00:00 -07:00
committed by Philipp Moritz
parent b316afeb43
commit 515da7721a
30 changed files with 282 additions and 407 deletions
+4 -4
View File
@@ -26,7 +26,7 @@ class TrainableFunctionApiTest(unittest.TestCase):
ray.init(num_cpus=4, num_gpus=0)
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def testPinObject(self):
@@ -366,7 +366,7 @@ class RunExperimentTest(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def testDict(self):
@@ -441,7 +441,7 @@ class VariantGeneratorTest(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def testParseToTrials(self):
@@ -575,7 +575,7 @@ class VariantGeneratorTest(unittest.TestCase):
class TrialRunnerTest(unittest.TestCase):
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def testTrialStatus(self):
+4 -4
View File
@@ -29,7 +29,7 @@ class EarlyStoppingSuite(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def basicSetup(self, rule):
@@ -196,7 +196,7 @@ class HyperbandSuite(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def schedulerSetup(self, num_trials):
@@ -561,7 +561,7 @@ class PopulationBasedTestingSuite(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def basicSetup(self, resample_prob=0.0, explore=None):
@@ -781,7 +781,7 @@ class AsyncHyperBandSuite(unittest.TestCase):
ray.init()
def tearDown(self):
ray.worker.cleanup()
ray.shutdown()
_register_all() # re-register the evicted objects
def basicSetup(self, scheduler):
+1 -1
View File
@@ -51,7 +51,7 @@ class TuneServerSuite(unittest.TestCase):
self.runner = None
except Exception as e:
print(e)
ray.worker.cleanup()
ray.shutdown()
_register_all()
def testAddTrial(self):