Tensorboard integration

Introduction#

Hkube allows to view data generated by tensorflow of users algorithm in Tensorboard UI.

Config#

logdir#

An algorithm using tensorflow generates tensorboard log data. In the algorithm code when creating Tensorboard object a logDir parameter is passed. For integration with Hkube the logDir value passed, must first be obtained from the environment variable : ALGO_METRICS_DIR.

log_dir = os.environ['ALGO_METRICS_DIR']
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
model.fit(x=x_train,
          y=y_train,
          epochs=5,
          validation_data=(x_test, y_test),
          callbacks=[tensorboard_callback])

Loading metrics in Tensorboard#

tenosrboard1.jpg

In hkube ui pipelines tab, its possible to identify which pipeline have ran and created tensorboard metrics by the orange label "metrics" Hovering over the actions icon pops up a "Create tensorboard for selected nodes" window. You can now select which nodes to create the tensorboard for, and click "create board".

tenosr2.jpg

Once board is created a label "boards" is added. Hovering over the "boards" pops up the link to the board displaying the data of the collected metrics.

tensor3.jpg

Next →Triggers