mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
[Tune] Better error when using checkpoint_freq (#9998)
This commit is contained in:
@@ -300,6 +300,15 @@ class FunctionApiTest(unittest.TestCase):
|
||||
ray.shutdown()
|
||||
_register_all() # re-register the evicted objects
|
||||
|
||||
def testCheckpointError(self):
|
||||
def train(config, checkpoint_dir=False):
|
||||
pass
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
tune.run(train, checkpoint_freq=1)
|
||||
with self.assertRaises(ValueError):
|
||||
tune.run(train, checkpoint_at_end=True)
|
||||
|
||||
def testCheckpointFunctionAtEnd(self):
|
||||
def train(config, checkpoint_dir=False):
|
||||
for i in range(10):
|
||||
|
||||
Reference in New Issue
Block a user