[Tune] Better error when using checkpoint_freq (#9998)

This commit is contained in:
Amog Kamsetty
2020-08-10 13:52:46 -07:00
committed by GitHub
parent be8e63d477
commit 856d4a0533
4 changed files with 15 additions and 9 deletions
@@ -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):