When I run some experiments on a remote server, I like to visualize the results with MLflow tracking or Tensorboard. To open the UI in the browser of my local machine, I use SSH port forwarding. To make things even simpler, I append some commands right after the ssh call, so I just have to type (or copy-paste from this webpage) a single line from my local terminal.

Here is my one-liner:

ssh -L 5003: example.com "source ~/.cache/pypoetry/virtualenvs/example-D6FNjH1C-py3.8/bin/activate; mlflow ui --backend-store-uri file:////example/logs/mlflow/ --port 5003"

Of course you can replace mlflow ui --backend-store-uri file:////example/logs/mlflow/ by tensorboard --logdir='./tensorboard_dirs' if you prefer Tensorboard.