Add PyTorch Lightning example (#47)

This commit is contained in:
pollfly 2021-08-23 11:02:53 +03:00 committed by GitHub
parent fb0c30a86e
commit 0048cea0d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,40 @@
---
title: Pytorch Lightning
---
The [pytorch-lightning](https://github.com/allegroai/clearml/blob/master/examples/frameworks/pytorch-lightning/pytorch_lightning_example.py)
script demonstrates the integration of ClearML into code that uses [PyTorch Lightning](https://www.pytorchlightning.ai/).
The example script does the following:
* Trains a simple deep neural network on the PyTorch built-in MNIST dataset
* Defines Argparse command line options, which are automatically captured by ClearML
* Creates an experiment named `pytorch lightning mnist example`, which is associated with the `examples` project.
## Scalars
The test loss and validation loss plots appear in the experiment's page in the ClearML web UI under **RESULTS > SCALARS**.
Resource utilization plots, which are titled **:monitor: machine**, also appear in the **SCALARS** tab. All of these
plots are automatically captured by ClearML.
![PyTorch Lightning console](../../../img/examples_pytorch_lightning_scalars.png)
## Hyperparameters
ClearML automatically logs command line options defined with argparse and TensorFlow Definitions, which appear in
**CONFIGURATIONS > HYPER PARAMETERS > Args** and **TF_DEFINE** respectively.
![PyTorch Lightning parameters](../../../img/examples_pytorch_lightning_params.png)
## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel of the **MODELS** tab.
![PyTorch Lightning model](../../../img/examples_pytorch_lightning_model.png)
## Console
All other console output appears in **RESULTS > CONSOLE**.
![PyTorch Lightning console](../../../img/examples_pytorch_lightning_console.png)

View File

@ -18,7 +18,7 @@ When the script runs, it creates an experiment named `Tensorflow v2 mnist with s
## Scalars
The loss and accuracy metric scalar plots appear in the experiment's page in the **ClearML web UI** under **RESULTS**
**>** **SCALARS**. Resource utilization plots, which are titled **:monitor: machine**, also appear in the *SCALARS** tab.
**>** **SCALARS**. Resource utilization plots, which are titled **:monitor: machine**, also appear in the **SCALARS** tab.
![image](../../../img/examples_tensorflow_mnist_06.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -76,6 +76,7 @@ module.exports = {
'guides/frameworks/pytorch/tensorboard_toy_pytorch']
},
{'Pytorch Ignite': ['guides/frameworks/pytorch ignite/integration_pytorch_ignite']},
{'Pytorch Lightning': ['guides/frameworks/pytorch_lightning/pytorch_lightning_example']},
{
'Pytorch Notebooks': [
{'Audio': ['guides/frameworks/pytorch/notebooks/audio/audio_classification_UrbanSound8K', 'guides/frameworks/pytorch/notebooks/audio/audio_preprocessing_example']},