[tune] Clean up result logging: move out of /tmp, add timestamp (#1297)

This commit is contained in:
Eric Liang
2017-12-15 14:19:08 -08:00
committed by GitHub
parent 12fdb3f53a
commit fbf1806b8a
11 changed files with 64 additions and 26 deletions
+1 -1
View File
@@ -153,6 +153,6 @@ workers, we can train the agent in around 25 minutes.
You can visualize performance by running
:code:`tensorboard --logdir [directory]` in a separate screen, where
:code:`[directory]` is defaulted to :code:`/tmp/ray/`. If you are running
:code:`[directory]` is defaulted to :code:`~/ray_results/`. If you are running
multiple experiments, be sure to vary the directory to which Tensorflow saves
its progress (found in :code:`a3c.py`).
+1 -1
View File
@@ -28,7 +28,7 @@ TensorBoard to the log output directory as follows.
.. code-block:: bash
tensorboard --logdir=/tmp/ray
tensorboard --logdir=~/ray_results
Many of the TensorBoard metrics are also printed to the console, but you might
find it easier to visualize and compare between runs using the TensorBoard UI.
+2 -2
View File
@@ -59,7 +59,7 @@ You can train a simple DQN agent with the following command
python ray/python/ray/rllib/train.py --run DQN --env CartPole-v0
By default, the results will be logged to a subdirectory of ``/tmp/ray``.
By default, the results will be logged to a subdirectory of ``~/ray_results``.
This subdirectory will contain a file ``params.json`` which contains the
hyperparameters, a file ``result.json`` which contains a training summary
for each episode and a TensorBoard file that can be used to visualize
@@ -67,7 +67,7 @@ training process with TensorBoard by running
::
tensorboard --logdir=/tmp/ray
tensorboard --logdir=~/ray_results
The ``train.py`` script has a number of options you can show by running
+4 -4
View File
@@ -50,7 +50,7 @@ This script runs a small grid search over the ``my_func`` function using ray.tun
== Status ==
Using FIFO scheduling algorithm.
Resources used: 4/8 CPUs, 0/0 GPUs
Result logdir: /tmp/ray/my_experiment
Result logdir: ~/ray_results/my_experiment
- my_func_0_alpha=0.2,beta=1: RUNNING [pid=6778], 209 s, 20604 ts, 7.29 acc
- my_func_1_alpha=0.4,beta=1: RUNNING [pid=6780], 208 s, 20522 ts, 53.1 acc
- my_func_2_alpha=0.6,beta=1: TERMINATED [pid=6789], 21 s, 2190 ts, 101 acc
@@ -63,14 +63,14 @@ In order to report incremental progress, ``my_func`` periodically calls the ``re
Visualizing Results
-------------------
Ray.tune logs trial results to a unique directory per experiment, e.g. ``/tmp/ray/my_experiment`` in the above example. The log records are compatible with a number of visualization tools:
Ray.tune logs trial results to a unique directory per experiment, e.g. ``~/ray_results/my_experiment`` in the above example. The log records are compatible with a number of visualization tools:
To visualize learning in tensorboard, run:
::
$ pip install tensorboard
$ tensorboard --logdir=/tmp/ray/my_experiment
$ tensorboard --logdir=~/ray_results/my_experiment
.. image:: ray-tune-tensorboard.png
@@ -79,7 +79,7 @@ To use rllab's VisKit (you may have to install some dependencies), run:
::
$ git clone https://github.com/rll/rllab.git
$ python rllab/rllab/viskit/frontend.py /tmp/ray/my_experiment
$ python rllab/rllab/viskit/frontend.py ~/ray_results/my_experiment
.. image:: ray-tune-viskit.png