TensorBoard
remote server
local viewing
machine learning
data visualization

How to locally view tensorboard of remote server

ML System Design practice on Codemia

Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.

Practice ML system design

Introduction

TensorBoard is a powerful tool to visualize the training of deep learning models that are implemented with TensorFlow. It allows users to plot loss curves, explore computation graphs, and visualize the embedding space, among other capabilities. However, running TensorBoard on a remote server and accessing it from a local machine can be challenging. This article will guide you through viewing TensorBoard on your local machine while running the actual training on a remote server.


Requirements

Before starting, ensure you have the following:

  1. Access to a Remote Server: A server with TensorBoard installed and SSH access enabled.
  2. An Active TensorFlow Environment: Ensure TensorFlow and TensorBoard are installed in your environment.
  3. SSH Setup: Your local machine should be able to connect to the remote server via SSH. Ensure you have the necessary credentials and SSH keys set up.

Steps to View TensorBoard Remotely

Step 1: Start TensorBoard on the Remote Server

  1. SSH into the Remote Server:
    • `-L 16006:localhost:6006`: Maps local port `16006` to the remote server's port `6006`.
    • `username@remote_server_address`: Your login credentials for the remote server.
    • Ensure your local machine's SSH key is added to the `~/.ssh/authorized_keys` file on the remote server.
    • Check if the remote server's SSH port is blocked by a firewall.
    • Ensure TensorBoard is running on the remote server by checking the terminal output for any errors.
    • Double-check that the correct port numbers are used when setting up the SSH tunnel.
    • If `6006` or `16006` is already in use, choose a different port number and update your commands accordingly.
  • Reverse Ports for Security: Instead of exposing remote ports, always prefer tunneling. This enhances security by obfuscating access points.
  • Session Management: Utilize `tmux` or `screen` on the remote server to run TensorBoard sessions without being tied to a single terminal session.

Related reading
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

ML System Design practice on Codemia

Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.

Practice ML system design

All Rights Reserved.