mirror of
https://github.com/wassname/ray.git
synced 2026-07-29 11:26:04 +08:00
Change the client/server API to RESTful design. This includes resource modeling, model URI's, and correct HTTP methods.
1.6 KiB
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)