Example edits (#158)

This commit is contained in:
pollfly 2022-01-13 09:42:36 +02:00 committed by GitHub
parent 15d28865c3
commit 5ea532ebd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 98 additions and 132 deletions

View File

@ -3,7 +3,7 @@ title: Remote Execution
--- ---
The [execute_remotely_example](https://github.com/allegroai/clearml/blob/master/examples/advanced/execute_remotely_example.py) The [execute_remotely_example](https://github.com/allegroai/clearml/blob/master/examples/advanced/execute_remotely_example.py)
script demonstrates the use of the [`Task.execute_remotely`](../../references/sdk/task.md#execute_remotely/) method. script demonstrates the use of the [`Task.execute_remotely`](../../references/sdk/task.md#execute_remotely) method.
:::note :::note
Make sure to have at least one [ClearML Agent](../../clearml_agent.md) running and assigned to listen to the `default` queue Make sure to have at least one [ClearML Agent](../../clearml_agent.md) running and assigned to listen to the `default` queue
@ -37,16 +37,19 @@ In the example script's `train` function, the following code explicitly reports
```python ```python
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"train", "loss", iteration=(epoch * len(train_loader) + batch_idx), value=loss.item()) "train", "loss", iteration=(epoch * len(train_loader) + batch_idx), value=loss.item()
)
``` ```
In the `test` method, the code explicitly reports `loss` and `accuracy` scalars. In the `test` method, the code explicitly reports `loss` and `accuracy` scalars.
```python ```python
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"test", "loss", iteration=epoch, value=test_loss) "test", "loss", iteration=epoch, value=test_loss
)
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"test", "accuracy", iteration=epoch, value=(correct / len(test_loader.dataset))) "test", "accuracy", iteration=epoch, value=(correct / len(test_loader.dataset))
)
``` ```
These scalars can be visualized in plots, which appear in the ClearML web UI, in the experiment's These scalars can be visualized in plots, which appear in the ClearML web UI, in the experiment's
@ -68,9 +71,8 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks models
the info panel of the **MODELS** tab. and any snapshots created using PyTorch.
![image](../../img/examples_remote_execution_artifacts.png) ![image](../../img/examples_remote_execution_artifacts.png)

View File

@ -2,8 +2,14 @@
title: AutoKeras IMDB title: AutoKeras IMDB
--- ---
The [autokeras_imdb_example.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/autokeras/autokeras_imdb_example.py) example The [autokeras_imdb_example.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/autokeras/autokeras_imdb_example.py) example
script demonstrates the integration of **ClearML** into code, which uses [autokeras](https://github.com/keras-team/autokeras). script demonstrates the integration of ClearML into code, which uses [autokeras](https://github.com/keras-team/autokeras).
It trains text classification networks on the Keras built-in [IMDB](https://keras.io/api/datasets/imdb/) dataset, using the autokeras [TextClassifier](https://autokeras.com/text_classifier/) class, and searches for the best model. It uses two TensorBoard callbacks, one for training and one for testing. **ClearML** automatically logs everything the code sends to TensorBoard. When the script runs, it creates an experiment named `autokeras imdb example with scalars`, which is associated with the `autokeras` project.
The example does the following:
* Trains text classification networks on the Keras built-in [IMDB](https://keras.io/api/datasets/imdb/) dataset, using
the autokeras [TextClassifier](https://autokeras.com/text_classifier/) class, and searches for the best model.
* Uses two TensorBoard callbacks, one for training and one for testing.
* ClearML automatically logs everything the code sends to TensorBoard.
* Creates an experiment named `autokeras imdb example with scalars`, which is associated with the `autokeras` project.
## Scalars ## Scalars
@ -26,12 +32,11 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the model info panel in the **MODELS** tab. Models created by the experiment appear in the experiments **ARTIFACTS** tab.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_keras_18.png) ![image](../../../img/examples_keras_18.png)
The model info panel contains the model details, including the model URL, framework, and snapshot locations. Clicking on the model's name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can view
the models details and access the model.
![image](../../../img/examples_keras_17.png) ![image](../../../img/examples_keras_17.png)

View File

@ -25,7 +25,8 @@ ClearML automatically logs the configurations applied to LightGBM. They appear i
## Artifacts ## 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. Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
models and any snapshots created using LightGBM.
![LightGBM model](../../../img/examples_lightgbm_model.png) ![LightGBM model](../../../img/examples_lightgbm_model.png)

View File

@ -8,10 +8,9 @@ demonstrates the integration of **ClearML** into code that uses PyTorch.
The example script does the following: The example script does the following:
* Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) * Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist)
dataset. dataset.
* Uses **ClearML** automatic logging.
* Calls the [Logger.report_scalar](../../../references/sdk/logger.md#report_scalar) method to demonstrate explicit reporting,
which allows adding customized reporting to the code.
* Creates an experiment named `pytorch mnist train`, which is associated with the `examples` project. * Creates an experiment named `pytorch mnist train`, which is associated with the `examples` project.
* ClearML automatically logs `argparse` command line options, and models (and their snapshots) created by PyTorch
* Additional metrics are logged by calling the [Logger.report_scalar](../../../references/sdk/logger.md#report_scalar) method.
## Scalars ## Scalars
@ -19,16 +18,19 @@ In the example script's `train` function, the following code explicitly reports
```python ```python
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"train", "loss", iteration=(epoch * len(train_loader) + batch_idx), value=loss.item()) "train", "loss", iteration=(epoch * len(train_loader) + batch_idx), value=loss.item()
)
``` ```
In the `test` method, the code explicitly reports `loss` and `accuracy` scalars. In the `test` method, the code explicitly reports `loss` and `accuracy` scalars.
```python ```python
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"test", "loss", iteration=epoch, value=test_loss) "test", "loss", iteration=epoch, value=test_loss
)
Logger.current_logger().report_scalar( Logger.current_logger().report_scalar(
"test", "accuracy", iteration=epoch, value=(correct / len(test_loader.dataset))) "test", "accuracy", iteration=epoch, value=(correct / len(test_loader.dataset))
)
``` ```
These scalars can be visualized in plots, which appear in the **ClearML web UI**, in the experiment's These scalars can be visualized in plots, which appear in the **ClearML web UI**, in the experiment's
@ -49,17 +51,12 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks models
the info panel of the **MODELS** tab. and any snapshots created using PyTorch.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_pytorch_mnist_02.png) ![image](../../../img/examples_pytorch_mnist_02.png)
The model info panel contains the model details, including: Clicking on the model name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can view
* Model URL the models details and access the model.
* Framework
* Snapshot locations.
![image](../../../img/examples_pytorch_mnist_03.png) ![image](../../../img/examples_pytorch_mnist_03.png)

View File

@ -3,16 +3,14 @@ title: PyTorch with TensorBoard
--- ---
The [pytorch_tensorboard.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/pytorch/pytorch_tensorboard.py) The [pytorch_tensorboard.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/pytorch/pytorch_tensorboard.py)
example demonstrates the integration of **ClearML** into code that uses PyTorch and TensorBoard. example demonstrates the integration of ClearML into code that uses PyTorch and TensorBoard.
The example does the following: The example does the following:
* Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) * Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist)
dataset. dataset.
* Creates a TensorBoard `SummaryWriter` object to log:
* Scalars during training.
* Scalars and debug samples during testing.
* Test text message to the console (a test message to demonstrate **ClearML**'s automatic logging).
* Creates an experiment named `pytorch with tensorboard`, which is associated with the `examples` project. * Creates an experiment named `pytorch with tensorboard`, which is associated with the `examples` project.
* ClearML automatically captures scalars and text logged using the TensorBoard `SummaryWriter` object, and
the model created by PyTorch.
## Scalars ## Scalars
@ -23,13 +21,13 @@ These scalars, along with the resource utilization plots, which are titled **:mo
## Debug Samples ## Debug Samples
**ClearML** automatically tracks images and text output to TensorFlow. They appear in **RESULTS** **>** **DEBUG SAMPLES**. ClearML automatically tracks images and text output to TensorFlow. They appear in **RESULTS** **>** **DEBUG SAMPLES**.
![image](../../../img/examples_pytorch_tensorboard_08.png) ![image](../../../img/examples_pytorch_tensorboard_08.png)
## Hyperparameters ## Hyperparameters
**ClearML** automatically logs TensorFlow Definitions. They appear in **CONFIGURATIONS** **>** **HYPER PARAMETERS** **>** **TF_DEFINE**. ClearML automatically logs TensorFlow Definitions. They appear in **CONFIGURATIONS** **>** **HYPER PARAMETERS** **>** **TF_DEFINE**.
![image](../../../img/examples_pytorch_tensorboard_01.png) ![image](../../../img/examples_pytorch_tensorboard_01.png)
@ -41,16 +39,12 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
of the **MODELS** tab. models and any snapshots created using PyTorch.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_pytorch_tensorboard_02.png) ![image](../../../img/examples_pytorch_tensorboard_02.png)
The model info panel contains the model details, including: Clicking on a model's name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can view
* Model URL the models details and access the model.
* Framework
* Snapshot locations.
![image](../../../img/examples_pytorch_tensorboard_03.png) ![image](../../../img/examples_pytorch_tensorboard_03.png)

View File

@ -3,28 +3,26 @@ title: PyTorch TensorBoardX
--- ---
The [pytorch_tensorboardX.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorboardx/pytorch_tensorboardX.py) The [pytorch_tensorboardX.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorboardx/pytorch_tensorboardX.py)
example demonstrates the integration of **ClearML** into code that uses PyTorch and TensorBoardX. example demonstrates the integration of ClearML into code that uses PyTorch and TensorBoardX.
The example does the following: The example does the following:
* Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) * Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist)
dataset. dataset.
* Creates a TensorBoardX `SummaryWriter` object to log: * Creates an experiment named `pytorch with tensorboardX`, which is associated with the `examples` project.
* Scalars during training * ClearML automatically captures scalars and text logged using the TensorBoardX `SummaryWriter` object, and
* Scalars and debug samples during testing the model created by PyTorch.
* A test text message to the console (a test message to demonstrate **ClearML** automatic logging).
* Creates an experiment named `pytorch with tensorboardX`, which is associated with the `examples` project in the **ClearML Web UI**.
## Scalars ## Scalars
The loss and accuracy metric scalar plots, along with the resource utilization plots, which are titled **:monitor: machine**, The loss and accuracy metric scalar plots, along with the resource utilization plots, which are titled **:monitor: machine**,
appear in the experiment's page in the **web UI**, under **RESULTS** **>** **SCALARS**. appear in the experiment's page in the [web UI](../../../webapp/webapp_overview.md), under **RESULTS** **>** **SCALARS**.
.
![image](../../../img/examples_pytorch_tensorboardx_03.png) ![image](../../../img/examples_pytorch_tensorboardx_03.png)
## Hyperparameters ## Hyperparameters
**ClearML** automatically logs command line options defined with `argparse`. They appear in **CONFIGURATIONS** **>** ClearML automatically logs command line options defined with `argparse`. They appear in **CONFIGURATIONS** **>**
**HYPER PARAMETERS** **>** **Args**. **HYPER PARAMETERS** **>** **Args**.
![image](../../../img/examples_pytorch_tensorboardx_01.png) ![image](../../../img/examples_pytorch_tensorboardx_01.png)
@ -37,16 +35,12 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
of the **MODELS** tab. models and any snapshots created using PyTorch.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_pytorch_tensorboardx_04.png) ![image](../../../img/examples_pytorch_tensorboardx_04.png)
The model info panel contains the model details, including: Clicking on the model name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can view
* Model URL the models details and access the model.
* Framework
* Snapshot locations.
![image](../../../img/examples_pytorch_tensorboardx_05.png) ![image](../../../img/examples_pytorch_tensorboardx_05.png)

View File

@ -28,10 +28,13 @@ ClearML automatically logs command line options defined with argparse and Tensor
## Artifacts ## 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. Models created by the experiment appear in the experiments **ARTIFACTS** tab.
![PyTorch Lightning model](../../../img/examples_pytorch_lightning_model.png) ![PyTorch Lightning model](../../../img/examples_pytorch_lightning_model.png)
Clicking on a model name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can view
the models details and access the model.
## Console ## Console
All other console output appears in **RESULTS > CONSOLE**. All other console output appears in **RESULTS > CONSOLE**.

View File

@ -3,28 +3,25 @@ title: scikit-learn with Joblib
--- ---
The [sklearn_joblib_example.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/scikit-learn/sklearn_joblib_example.py) The [sklearn_joblib_example.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/scikit-learn/sklearn_joblib_example.py)
demonstrates the integration of **ClearML** into code that uses `scikit-learn` and `joblib` to store a model and model snapshots, demonstrates the integration of ClearML into code that uses `scikit-learn` and `joblib` to store a model and model snapshots,
and `matplotlib` to create a scatter diagram. When the script runs, it creates an experiment named `scikit-learn joblib examplescikit-learn joblib example`, which is associated with the `examples` project. and `matplotlib` to create a scatter diagram. When the script runs, it creates an experiment named
`scikit-learn joblib examplescikit-learn joblib example`, which is associated with the `examples` project.
## Plots ## Plots
**ClearML** automatically logs the scatter plot, which appears in the experiment's page in the **ClearML web UI**, under ClearML automatically logs the scatter plot, which appears in the [experiment's page](../../../webapp/webapp_exp_track_visual.md)
**RESULTS** **>** **PLOTS**. in the ClearML web UI, under **RESULTS** **>** **PLOTS**.
![image](../../../img/examples_sklearn_joblib_example_06.png) ![image](../../../img/examples_sklearn_joblib_example_06.png)
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab.
of the **MODELS** tab.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_sklearn_joblib_example_01.png) ![image](../../../img/examples_sklearn_joblib_example_01.png)
The model info panel contains the model details, including: Clicking on the model name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
* Model URL view the models details and access the model.
* Framework
* Snapshot locations.
![image](../../../img/examples_sklearn_joblib_example_02.png) ![image](../../../img/examples_sklearn_joblib_example_02.png)

View File

@ -3,15 +3,13 @@ title: TensorBoardX with PyTorch
--- ---
The [pytorch_tensorboardX.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorboardx/pytorch_tensorboardX.py) The [pytorch_tensorboardX.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorboardx/pytorch_tensorboardX.py)
example demonstrates the integration of **ClearML** into code that uses PyTorch and TensorBoardX. example demonstrates the integration of ClearML into code that uses PyTorch and TensorBoardX.
The script does the following: The script does the following:
1. Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) dataset. * Trains a simple deep neural network on the PyTorch built-in [MNIST](https://pytorch.org/vision/stable/datasets.html#mnist) dataset.
1. Creates a TensorBoardX `SummaryWriter` object to log: * Creates an experiment named `pytorch with tensorboardX` which is associated with the `examples` project
* Scalars during training * ClearML automatically captures scalars and text logged using the TensorBoardX `SummaryWriter` object, and
* Scalars and debug samples during testing the model created by PyTorch.
* A test text message to the console (a test message to demonstrate **ClearML**).
1. Creates an experiment named `pytorch with tensorboardX` which is associated with the `examples` project in the **ClearML Web UI**.
## Scalars ## Scalars
@ -22,7 +20,7 @@ The loss and accuracy metric scalar plots appear in the experiment's page in the
## Hyperparameters ## Hyperparameters
**ClearML** automatically logs command line options defined with `argparse`. They appear in **CONFIGURATIONS** **>** ClearML automatically logs command line options defined with `argparse`. They appear in **CONFIGURATIONS** **>**
**HYPER PARAMETERS** **>** **Args**. **HYPER PARAMETERS** **>** **Args**.
![image](../../../img/examples_pytorch_tensorboardx_01.png) ![image](../../../img/examples_pytorch_tensorboardx_01.png)
@ -35,17 +33,13 @@ Text printed to the console for training progress, as well as all other console
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
of the **MODELS** tab. models and any snapshots created using PyTorch.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_pytorch_tensorboardx_04.png) ![image](../../../img/examples_pytorch_tensorboardx_04.png)
The model info panel contains the model details, including: Clicking on the models name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
* Model URL view the models details and access the model.
* Framework
* Snapshot locations.
![image](../../../img/examples_pytorch_tensorboardx_05.png) ![image](../../../img/examples_pytorch_tensorboardx_05.png)

View File

@ -3,7 +3,7 @@ title: TensorFlow MNIST
--- ---
The [tensorflow_mnist.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorflow/tensorflow_mnist.py) The [tensorflow_mnist.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/tensorflow/tensorflow_mnist.py)
example demonstrates the integration of **ClearML** into code that uses TensorFlow and Keras to train a neural network on example demonstrates the integration of ClearML into code that uses TensorFlow and Keras to train a neural network on
the Keras built-in [MNIST](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist) handwritten digits dataset. the Keras built-in [MNIST](https://www.tensorflow.org/api_docs/python/tf/keras/datasets/mnist) handwritten digits dataset.
The script builds a TensorFlow Keras model, and trains and tests it with the following: The script builds a TensorFlow Keras model, and trains and tests it with the following:
@ -24,7 +24,7 @@ The loss and accuracy metric scalar plots appear in the experiment's page in the
## Hyperparameters ## Hyperparameters
**ClearML** automatically logs TensorFlow Definitions. They appear in **CONFIGURATIONS** **>** **HYPER PARAMETERS** ClearML automatically logs TensorFlow Definitions. They appear in **CONFIGURATIONS** **>** **HYPER PARAMETERS**
**>** **TF_DEFINE**. **>** **TF_DEFINE**.
![image](../../../img/examples_tensorflow_mnist_01.png) ![image](../../../img/examples_tensorflow_mnist_01.png)
@ -37,18 +37,13 @@ All console output appears in **RESULTS** **>** **CONSOLE**.
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
of the **MODELS** tab. models and any snapshots created using TensorFlow.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_tensorflow_mnist_03.png) ![image](../../../img/examples_tensorflow_mnist_03.png)
The model info panel contains the model details, including: Clicking on a models name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
* Model design view the models details and access the model.
* Label enumeration
* Model URL
* Framework
* Snapshot locations.
![image](../../../img/examples_tensorflow_mnist_10.png) ![image](../../../img/examples_tensorflow_mnist_10.png)

View File

@ -3,26 +3,15 @@ title: XGBoost and scikit-learn
--- ---
The [xgboost_sample.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/xgboost/xgboost_sample.py) The [xgboost_sample.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/xgboost/xgboost_sample.py)
example demonstrates integrating ClearML into code that trains a network on the scikit-learn [iris](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris) example demonstrates integrating ClearML into code that uses [XGBoost](https://xgboost.readthedocs.io/en/stable/).
classification dataset, using XGBoost to do the following:
* Load a model ([xgboost.Booster.load_model](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.Booster.load_model)) The example does the following:
* Save a model ([xgboost.Booster.save_model](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.Booster.save_model)) * Trains a network on the scikit-learn [iris](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_iris.html#sklearn.datasets.load_iris)
* Dump a model to JSON or text file ([xgboost.Booster.dump_model](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.Booster.dump_model)) classification dataset using XGBoost
* Plot feature importance ([xgboost.plot_importance](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.plot_importance)) * Scores accuracy using scikit-learn
* Plot a tree ([xgboost.plot_tree](https://xgboost.readthedocs.io/en/latest/python/python_api.html#xgboost.plot_tree)) * ClearML automatically logs the input model registered by XGBoost, and the output model (and its checkpoints),
feature importance plot, and tree plot created with XGBoost.
And using scikit-learn to score accuracy ([sklearn.metrics.accuracy_score](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.accuracy_score.html)). * Creates an experiment named `XGBoost simple example`, which is associated with the `examples` project.
ClearML automatically logs:
* Input model
* Output model
* Model checkpoints (snapshots)
* Feature importance plot
* Tree plot
* Output to console.
When the script runs, it creates an experiment named `XGBoost simple example`, which is associated with the `examples` project.
## Plots ## Plots
@ -39,17 +28,12 @@ All other console output appear in **RESULTS** **>** **CONSOLE**.
## Artifacts ## Artifacts
Model artifacts associated with the experiment appear in the info panel of the **EXPERIMENTS** tab and in the info panel Models created by the experiment appear in the experiments **ARTIFACTS** tab. ClearML automatically logs and tracks
of the **MODELS** tab. models and any snapshots created using XGBoost.
The experiment info panel shows model tracking, including the model name and design (in this case, no design was stored).
![image](../../../img/examples_xgboost_sample_10.png) ![image](../../../img/examples_xgboost_sample_10.png)
The model info panel contains the model details, including: Clicking on the model's name takes you to the [models page](../../../webapp/webapp_model_viewing.md), where you can
* Model design view the models details and access the model.
* Label enumeration
* Model URL
* Framework.
![image](../../../img/examples_xgboost_sample_03.png) ![image](../../../img/examples_xgboost_sample_03.png)

View File

@ -40,8 +40,8 @@ The **DETAILS** tab includes deep comparisons of the following:
### Artifacts ### Artifacts
* Input model and model design. * Input model and model configuration.
* Output model and model design. * Output model and model configuration.
* Other artifacts, if any. * Other artifacts, if any.
### Execution Details ### Execution Details