clearml-docs/docs/guides/frameworks/tensorboardx/tensorboardx.md

46 lines
1.8 KiB
Markdown
Raw Normal View History

2021-05-13 23:48:51 +00:00
---
2021-10-21 09:22:42 +00:00
title: TensorBoardX with PyTorch
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 experiments **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 models name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
view the models 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