Files
ray/python/ray/tune/TuneClient.ipynb
T
Richard Liaw a7d544424c [tune] Experiment Management API (#1328)
* init for exposing external interface

* revisions

* http server

* small

* simplify

* ui

* fixes

* test

* nit

* nit

* merge

* untested

* nits

* nit

* init tests

* tests

* more tests

* nit

* fix hyperband

* cleanup

* nits

* good stuff

* cleanup

* comments and need to test

* nit

* notebook

* testing

* test and expose server

* server_tests

* docs

* periods

* fix tests

* committing test

* fi
2018-01-24 13:45:10 -08:00

89 lines
1.7 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from ray.tune.web_server import TuneClient\n",
"\n",
"manager = TuneClient(tune_address=\"localhost:4321\")\n",
"\n",
"x = manager.get_all_trials()\n",
"\n",
"[((y[\"id\"]), y[\"status\"]) for y in x[\"trials\"]]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true,
"scrolled": false
},
"outputs": [],
"source": [
"for y in x[\"trials\"][-10:]:\n",
" manager.stop_trial(y[\"id\"])"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"from ray.tune.variant_generator import generate_trials\n",
"import yaml\n",
"\n",
"with open(\"../rllib/tuned_examples/hyperband-cartpole.yaml\") as f:\n",
" d = yaml.load(f)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"name, spec = [x for x in d.items()][0]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"manager.add_trial(name, spec)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}