Skip to content

Commit

Permalink
Make ray test less (not?) stochastic
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-T-McCann committed Apr 14, 2022
1 parent ea6dbfb commit ef3988b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scico/test/test_ray_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}


Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit ef3988b

Please sign in to comment.