[tune] Make test_api faster (#8844)

This commit is contained in:
Richard Liaw
2020-06-09 12:45:27 -07:00
committed by GitHub
parent d7b64ef279
commit fc54dc8652
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -143,7 +143,7 @@ py_test(
py_test(
name = "test_api",
size = "medium",
size = "large",
srcs = ["tests/test_api.py"],
deps = [":tune_lib"],
tags = ["exclusive"],
+2 -2
View File
@@ -514,10 +514,10 @@ class TrainableFunctionApiTest(unittest.TestCase):
all(t.status == Trial.TERMINATED for t in analysis.trials))
self.assertTrue(len(analysis.dataframe()) <= top)
patience = 10
patience = 5
stopper = EarlyStopping("test", top=top, mode="min", patience=patience)
analysis = tune.run(train, num_samples=100, stop=stopper)
analysis = tune.run(train, num_samples=20, stop=stopper)
self.assertTrue(
all(t.status == Trial.TERMINATED for t in analysis.trials))
self.assertTrue(len(analysis.dataframe()) <= patience)