From 8c96c34bb3b8fe16930676b859158d14917efbdd Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Fri, 26 Jan 2018 21:51:07 -0800 Subject: [PATCH] [tune] fix doc typo and also make sure to clean "/" from config (#1476) --- doc/source/tune.rst | 4 ++-- python/ray/tune/variant_generator.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/tune.rst b/doc/source/tune.rst index ce85f1f67..948cb5a15 100644 --- a/doc/source/tune.rst +++ b/doc/source/tune.rst @@ -90,7 +90,7 @@ To use rllab's VisKit (you may have to install some dependencies), run: .. image:: ray-tune-viskit.png -Finally, to view the results with a `parallel coordinates visualization `__, open `ParalleCoordinatesVisualization.ipynb `__ as follows and run its cells: +Finally, to view the results with a `parallel coordinates visualization `__, open `ParallelCoordinatesVisualization.ipynb `__ as follows and run its cells: .. code-block:: bash @@ -146,7 +146,7 @@ Note that some trial schedulers such as HyperBand require your Trainable to supp Bracket(n=34, r=3, completed=0%): {'RUNNING': 2, 'PENDING': 32} Bracket(n=81, r=1, completed=0%): {'PENDING': 38} Resources used: 4/4 CPUs, 0/0 GPUs - Result logdir: /home/eric/ray_results/hyperband_test + Result logdir: ~/ray_results/hyperband_test PAUSED trials: - my_class_0_height=99,width=43: PAUSED [pid=11664], 0 s, 100 ts, 97.1 rew - my_class_11_height=85,width=81: PAUSED [pid=11771], 0 s, 33 ts, 32.8 rew diff --git a/python/ray/tune/variant_generator.py b/python/ray/tune/variant_generator.py index bf80ddc9a..7ea8b334c 100644 --- a/python/ray/tune/variant_generator.py +++ b/python/ray/tune/variant_generator.py @@ -128,7 +128,7 @@ def _format_vars(resolved_vars): last_string = False pieces.append(k) pieces.reverse() - out.append("_".join(pieces) + "=" + _clean_value(value)) + out.append(_clean_value("_".join(pieces)) + "=" + _clean_value(value)) return ",".join(out) @@ -136,7 +136,7 @@ def _clean_value(value): if isinstance(value, float): return "{:.5}".format(value) else: - return str(value) + return str(value).replace("/", "_") def _generate_variants(spec):