Files
ray/python/ray/tune/TuneClient.ipynb
T

1.6 KiB

In [ ]:
from ray.tune.web_server import TuneClient

manager = TuneClient(tune_address="localhost", port_forward=4321)

x = manager.get_all_trials()

[((y["id"]), y["status"]) for y in x["trials"]]
In [ ]:
for y in x["trials"][-10:]:
    manager.stop_trial(y["id"])
In [ ]:
import yaml

with open("../rllib/tuned_examples/hyperband-cartpole.yaml") as f:
    d = yaml.safe_load(f)
In [ ]:
name, spec = [x for x in d.items()][0]
In [ ]:
manager.add_trial(name, spec)