Vizualize training using TensorBoard and Weights and Biases(W&B)¶
Few things to keep in mind when visualizing training on HPC clusters:
- Compute nodes have no internet
- Login and/or devel nodes have internet
- Logs live on a filesystem accessible from the nodes you use to view/sync (typically
$SCRATCH,$PROJECT, etc.)
TensorBoard¶
Launch TensorBoard on a node you can SSH into (login or devel)¶
If your training wrote TensorBoard event files under a directory like runs/exp_001/tb, start TensorBoard from a node that can access that path:
Tips:
- If you manage multiple experiments under one root (e.g.,
runs/), you can point TensorBoard at the root:
- Keep TensorBoard running after disconnecting by using
tmux:
View TensorBoard from your local machine(laptop) via SSH tunneling¶
From your laptop, open a tunnel to the login/devel node where TensorBoard is running:
Make sure the hostname of the login-node is exactly the one where you started TensorBoard. Also make sure the port on your local machine is not used by other processes
Then open in your browser: http://localhost:6006
Weights & Biases (W&B) (Offline → Sync Later)¶
Setup once (on login/devel with internet)¶
On a node with internet (login/devel), authenticate your W&B client:
Do this once per environment (or whenever your auth expires).
Sync offline runs from login/devel (internet)¶
Compute-node jobs should produce offline run directories on shared storage. Later, from a node with internet (login/devel), sync them to W&B cloud.
If you know the run directory:
If you have multiple runs and want to sync everything under the folder:
Notes:
- Sync is safe to re-run; it will skip already-uploaded data in most cases.
- If you don’t see
offline-run-*directories, you may be pointing at the wrong location (see quick checks below).
Quick checks:
W&B online on devel nodes only (optional)¶
If you sometimes run on a devel node that has internet and you want W&B to upload live:
Enable online mode:
For compute nodes without internet, ensure offline mode:
This lets you keep the same workflow while controlling behavior per node type.