mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 21:38:18 +08:00
[tune] Make test_api faster (#8844)
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user