From 03709d67cbd7a5d84f6c7622680b2de29338213c Mon Sep 17 00:00:00 2001 From: Amog Kamsetty Date: Fri, 24 Jul 2020 11:20:52 -0700 Subject: [PATCH] [Tune Docs] Logging doc fix (#9691) --- doc/source/tune/api_docs/logging.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/source/tune/api_docs/logging.rst b/doc/source/tune/api_docs/logging.rst index 993143fea..14561fb1a 100644 --- a/doc/source/tune/api_docs/logging.rst +++ b/doc/source/tune/api_docs/logging.rst @@ -77,6 +77,8 @@ You can do this in the trainable, as shown below: **Function API**: +``library`` refers to whatever 3rd party logging library you are using. + .. code-block:: python def trainable(config): @@ -86,12 +88,12 @@ You can do this in the trainable, as shown below: resume=trial_id, reinit=True, allow_val_change=True) - library.set_log_path(tune.track.logdir) + library.set_log_path(tune.get_trial_dir()) for step in range(100): library.log_model(...) library.log(results, step=step) - tune.track.log(results) + tune.report(results) **Class API**: @@ -121,7 +123,7 @@ You can do this in the trainable, as shown below: step = result["training_iteration"] library.log(res_dict, step=step) -Use ``self.logdir`` (only for Class API) or ``tune.track.logdir`` (only for Function API) for the trial log directory. +Use ``self.logdir`` (only for Class API) or ``tune.get_trial_dir()`` (only for Function API) for the trial log directory. In the distributed case, these logs will be sync'ed back to the driver under your logger path. This will allow you to visualize and analyze logs of all distributed training workers on a single machine.