> For the complete documentation index, see [llms.txt](https://aizen-corp.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aizen-corp.gitbook.io/docs/managing-ml-workflows/training-an-ml-model.md).

# Training an ML Model

{% hint style="info" %}
A training dataset is required to train an ML model. See [Creating Training Datasets](/docs/managing-ml-workflows/creating-training-datasets.md).
{% endhint %}

To train an ML model, follow these steps:

1. Log in to the Aizen Jupyter console. See [Using the Aizen Jupyter Console](/docs/getting-started/using-the-aizen-jupyter-console.md).
2. Set the current working project.

   <pre data-overflow="wrap"><code>set project &#x3C;project name>
   </code></pre>
3. Configure a training experiment by running the `configure training` command:

   <pre data-overflow="wrap"><code>configure training
   </code></pre>
4. In the notebook, you will be guided through a template form with boxes and drop-down lists that you can complete to define the experiment. At a minimum, you must choose either `Machine Learning` or `Deep Learning`, and you must specify the input features and the output (or label) features from the dataset. Additionally, you may specify the feature types and specify several options in the advanced settings.
5. Execute the training experiment using the `start training` command to schedule a job. Optionally, you may configure resources for the job by running the `configure resource` command. If you do not configure resources, default resource settings will be applied.

   <pre data-overflow="wrap"><code>configure resource
   start training &#x3C;experiment name>
   </code></pre>
6. While the job is running, you may check the job status and check the training progress on TensorBoard or MLflow by using the URL shown in the `status training` command or by listing the TensorBoard or MLflow URL for the training run.

   <pre data-overflow="wrap"><code>status training &#x3C;experiment name>
   list tensorboard &#x3C;ML model name>,&#x3C;run id>
   list mlflow &#x3C;ML model name>,&#x3C;run id>
   </code></pre>
7. Wait for the job to complete, and then check your training results:

   <pre data-overflow="wrap"><code>status training &#x3C;experiment name>
   </code></pre>
8. List the trained models and display training results:

   <pre data-overflow="wrap"><code>list trained-models &#x3C;ML model name>
   list trained-model &#x3C;ML model name>
   </code></pre>
9. You may compare the results of various training runs of a given ML model using the TensorBoard or MLflow URL for the ML model:

   <pre data-overflow="wrap"><code>list tensorboard &#x3C;ML model name>
   list mlflow &#x3C;ML model name>
   </code></pre>
