Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tune Docs] Logging doc fix #9691

Merged
merged 1 commit into from
Jul 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/source/tune/api_docs/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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**:
Expand Down Expand Up @@ -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.

Expand Down