2021-05-13 23:48:51 +00:00
|
|
|
|
---
|
2023-06-22 13:08:26 +00:00
|
|
|
|
title: TensorBoardX
|
|
|
|
|
displayed_sidebar: mainSidebar
|
2021-05-13 23:48:51 +00:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
The [pytorch_tensorboardX.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorboardx/pytorch_tensorboardX.py)
|
2022-01-13 07:42:36 +00:00
|
|
|
|
example demonstrates the integration of ClearML into code that uses PyTorch and TensorBoardX.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
The script does the following:
|
2022-01-16 09:13:53 +00:00
|
|
|
|
* Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) dataset
|
2022-01-13 07:42:36 +00:00
|
|
|
|
* Creates an experiment named `pytorch with tensorboardX` which is associated with the `examples` project
|
|
|
|
|
* ClearML automatically captures scalars and text logged using the TensorBoardX `SummaryWriter` object, and
|
2022-01-16 09:13:53 +00:00
|
|
|
|
the model created by PyTorch
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
## Scalars
|
|
|
|
|
|
|
|
|
|
The loss and accuracy metric scalar plots appear in the experiment's page in the **ClearML web UI**, under
|
2022-05-22 07:27:30 +00:00
|
|
|
|
**SCALARS**. The also includes resource utilization plots, which are titled **:monitor: machine**.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
![image](../../../img/examples_pytorch_tensorboardx_03.png)
|
|
|
|
|
|
|
|
|
|
## Hyperparameters
|
|
|
|
|
|
2022-05-26 06:54:41 +00:00
|
|
|
|
ClearML automatically logs command line options defined with `argparse`. They appear in **CONFIGURATION** **>**
|
2023-01-12 10:49:55 +00:00
|
|
|
|
**HYPERPARAMETERS** **>** **Args**.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
![image](../../../img/examples_pytorch_tensorboardx_01.png)
|
|
|
|
|
|
2021-05-18 22:31:01 +00:00
|
|
|
|
## Console
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
2022-05-22 07:27:30 +00:00
|
|
|
|
Text printed to the console for training progress, as well as all other console output, appear in **CONSOLE**.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
![image](../../../img/examples_pytorch_tensorboardx_02.png)
|
|
|
|
|
|
|
|
|
|
## Artifacts
|
|
|
|
|
|
2022-01-13 07:42:36 +00:00
|
|
|
|
Models created by the experiment appear in the experiment’s **ARTIFACTS** tab. ClearML automatically logs and tracks
|
|
|
|
|
models and any snapshots created using PyTorch.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
|
|
|
|
![image](../../../img/examples_pytorch_tensorboardx_04.png)
|
|
|
|
|
|
2022-01-13 07:42:36 +00:00
|
|
|
|
Clicking on the model’s name takes you to the [model’s page](../../../webapp/webapp_model_viewing.md), where you can
|
|
|
|
|
view the model’s details and access the model.
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|
2022-03-13 13:07:06 +00:00
|
|
|
|
![image](../../../img/examples_pytorch_tensorboardx_model.png)
|
2021-05-13 23:48:51 +00:00
|
|
|
|
|