Files
ray/python/ray/tune/TuneClient.ipynb
T
Adi ZimmermanandRichard Liaw 5cf388f29d [tune] Support RESTful API for the Web Server (#4080)
Change the client/server API to RESTful design. This includes resource modeling, model URI's, and correct HTTP methods.
2019-02-26 21:56:02 -08:00

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.load(f)
In [ ]:
name, spec = [x for x in d.items()][0]
In [ ]:
manager.add_trial(name, spec)