mirror of
https://github.com/wassname/ray.git
synced 2026-08-07 11:27:43 +08:00
[tune] Tutorial UX Changes (#4990)
* add integration, iris, ASHA, recursive changes, set reuse_actors=True, and enable Analysis as a return object * docstring * fix up example * fix * cleanup tests * experiment analysis
This commit is contained in:
@@ -441,6 +441,14 @@ class TrainableFunctionApiTest(unittest.TestCase):
|
||||
|
||||
self.assertRaises(TuneError, f)
|
||||
|
||||
def testNestedStoppingReturn(self):
|
||||
def train(config, reporter):
|
||||
for i in range(10):
|
||||
reporter(test={"test1": {"test2": i}})
|
||||
|
||||
[trial] = tune.run(train, stop={"test": {"test1": {"test2": 6}}})
|
||||
self.assertEqual(trial.last_result["training_iteration"], 7)
|
||||
|
||||
def testEarlyReturn(self):
|
||||
def train(config, reporter):
|
||||
reporter(timesteps_total=100, done=True)
|
||||
|
||||
Reference in New Issue
Block a user