Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bwohlberg committed Oct 30, 2023
1 parent 09f8d88 commit 7229726
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scico/test/test_ray_tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

try:
import ray
from scico.ray import train, tune
from scico.ray import report, tune

ray.init(num_cpus=1)
except ImportError as e:
Expand All @@ -18,7 +18,7 @@ def test_random_run():
def eval_params(config):
x, y = config["x"], config["y"]
cost = x**2 + (y - 0.5) ** 2
train.report({"cost": cost})
report({"cost": cost})

config = {"x": tune.uniform(-1, 1), "y": tune.uniform(-1, 1)}
resources = {"gpu": 0, "cpu": 1}
Expand All @@ -43,7 +43,7 @@ def test_random_tune():
def eval_params(config):
x, y = config["x"], config["y"]
cost = x**2 + (y - 0.5) ** 2
train.report({"cost": cost})
report({"cost": cost})

config = {"x": tune.uniform(-1, 1), "y": tune.uniform(-1, 1)}
resources = {"gpu": 0, "cpu": 1}
Expand All @@ -68,7 +68,7 @@ def test_hyperopt_run():
def eval_params(config):
x, y = config["x"], config["y"]
cost = x**2 + (y - 0.5) ** 2
train.report({"cost": cost})
report({"cost": cost})

config = {"x": tune.uniform(-1, 1), "y": tune.uniform(-1, 1)}
resources = {"gpu": 0, "cpu": 1}
Expand All @@ -91,7 +91,7 @@ def test_hyperopt_tune():
def eval_params(config):
x, y = config["x"], config["y"]
cost = x**2 + (y - 0.5) ** 2
train.report({"cost": cost})
report({"cost": cost})

config = {"x": tune.uniform(-1, 1), "y": tune.uniform(-1, 1)}
resources = {"gpu": 0, "cpu": 1}
Expand All @@ -115,7 +115,7 @@ def test_hyperopt_tune_alt_init():
def eval_params(config):
x, y = config["x"], config["y"]
cost = x**2 + (y - 0.5) ** 2
train.report({"cost": cost})
report({"cost": cost})

config = {"x": tune.uniform(-1, 1), "y": tune.uniform(-1, 1)}
tuner = tune.Tuner(
Expand Down

0 comments on commit 7229726

Please sign in to comment.