Skip to main content

PyTorch TensorBoardX

The pytorch_tensorboardX.py example demonstrates the integration of ClearML into code that uses PyTorch and TensorBoardX.

The example does the following:

  • Trains a simple deep neural network on the PyTorch built-in MNIST dataset.
  • Creates a task named pytorch with tensorboardX in the examples project.
  • ClearML automatically captures scalars and text logged using the TensorBoardX SummaryWriter object, and the model created by PyTorch.

Scalars​

The loss and accuracy metric scalar plots, along with the resource utilization plots, which are titled :monitor: machine, appear in the task's page in the web UI, under SCALARS.

Scalars Scalars

Hyperparameters​

ClearML automatically logs command line options defined with argparse. They appear in CONFIGURATION > HYPERPARAMETERS > Args.

Hyperparameters Hyperparameters

Log​

Text printed to the console for training progress, as well as all other console output, appear in CONSOLE.

Console log Console log

Artifacts​

Models created by the task appear in the task's ARTIFACTS tab. ClearML automatically logs and tracks models and any snapshots created using PyTorch.

Artifacts Artifacts

Clicking on the model name takes you to the model's page, where you can view the model's details and access the model.

Model details Model details