From ef3988bf6c8e21d9cb99b10ef7da0571ec74ae94 Mon Sep 17 00:00:00 2001 From: Michael-T-McCann Date: Thu, 14 Apr 2022 11:49:30 -0600 Subject: [PATCH] Make ray test less (not?) stochastic --- scico/test/test_ray_tune.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scico/test/test_ray_tune.py b/scico/test/test_ray_tune.py index 72036a143..ad112eb21 100644 --- a/scico/test/test_ray_tune.py +++ b/scico/test/test_ray_tune.py @@ -22,7 +22,10 @@ def eval_params(config, reporter): tune.ray.tune.register_trainable("eval_func", eval_params) -config = {"x": tune.grid_search(-1, 1), "y": tune.grid_search(-1, 1)} +config = { + "x": tune.grid_search(list(np.linspace(-1, 1, 25))), + "y": tune.grid_search(list(np.linspace(-1, 1, 25))), +} resources = {"gpu": 0, "cpu": 1} @@ -32,7 +35,7 @@ def test_random(): "eval_func", metric="cost", mode="min", - num_samples=50, + num_samples=1, # per grid point config=config, resources_per_trial=resources, hyperopt=False, @@ -50,7 +53,7 @@ def test_hyperopt(): eval_params, metric="cost", mode="min", - num_samples=50, + num_samples=1, # per grid point config=config, resources_per_trial=resources, hyperopt=True,