Tensorboard Class

Represents a TensorBoard instance for visualizing experiment performance and structure.

Initialize the Tensorboard.

Inheritance
builtins.object
Tensorboard

Constructor

Tensorboard(runs, local_root=None, port=6006, use_display_name=False)

Parameters

Name Description
runs
Required

An empty list or a list of one or more experiment Run objects to attach to this Tensorboard instance.

local_root
str

An optional local directory to store the run logs in.

default value: None
port
int

The port to run this Tensorboard instance on.

default value: 6006
runs
Required

An empty list or a list of one or more experiment Run objects to attach to this Tensorboard instance.

local_root
Required
str

An optional local directory to store the run logs in.

port
Required
int

The port to run this Tensorboard instance on.

use_display_name

An optional parameter to load tensorboard logs using experiment run's display name instead of ID.

default value: False

Remarks

Create a Tensorboard instance to consume run history from machine learning experiments that output Tensorboard logs including those generated in TensorFlow, PyTorch, and Chainer. In these scenarios, the Tensorboard instance monitors the runs specified and downloads log data to the local_root location in real time after starting the instance with the start method. For long running processes, such as deep neural network training that could take days to complete, the Tensorboard instance will continue to download logs and persist them across multiple instantiations. Child runs of specified runs aren't monitored.

If a Tensorboard instance is created with no runs specified (an empty list), then the instance will work against any logs in local_root.

Start the Tensorboard instance with the start method. Stop the instance with the stop method when you are finished with it. For more information about using Tensorboard, see Visualize experiment runs and metrics with Tensorboard.

The following example shows how to create a Tensorboard instance to track run history from a Tensorflow experiment.


   from azureml.tensorboard import Tensorboard

   # The Tensorboard constructor takes an array of runs, so be sure and pass it in as a single-element array here
   tb = Tensorboard([run])

   # If successful, start() returns a string with the URI of the instance.
   tb.start()

Full sample is available from https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/track-and-monitor-experiments/tensorboard/tensorboard/tensorboard.ipynb

Methods

start

Start the Tensorboard instance, and begin processing logs.

stop

Stop the Tensorboard instance.

start

Start the Tensorboard instance, and begin processing logs.

start(start_browser=False)

Parameters

Name Description
start_browser

Specifies whether to open a browser upon starting the instance.

default value: False

Returns

Type Description
str

The URL for accessing the Tensorboard instance.

stop

Stop the Tensorboard instance.

stop()

Returns

Type Description

None

Attributes

LOGS_ARTIFACT_PREFIX

LOGS_ARTIFACT_PREFIX = 'logs/'