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.
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:
- Access to a Remote Server: A server with TensorBoard installed and SSH access enabled.
- An Active TensorFlow Environment: Ensure TensorFlow and TensorBoard are installed in your environment.
- 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
- 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
- How to log Keras loss output to a file
- How to make a 2D Gaussian Filter in Tensorflow?
- How to make a custom activation function with only Python in Tensorflow?
- How to make an if statement using a boolean Tensor
- How to make Keras use Tensorflow backend in Anaconda?
- How to make predictions on test image after training inception model from scratch on custom dataset?
- How to loop over grouped Pandas dataframe?
- How to make a force directed layout with no node-edge overlapping
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack 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.