- [2.5.2 AutoML Configuration and training](#252-automl-configuration-and-training)
- [3. Model deployment and endpoint consumption with the Azure ML SDK](#3-model-deployment-and-endpoint-consumption-with-the-azure-ml-sdk)
- [🚀 Challenge](#-challenge)
- [Post-Lecture Quiz](#post-lecture-quiz)
- [Review & Self Study](#review--self-study)
@ -86,7 +87,7 @@ To create a Notebook, we need a compute node that is serving out the jupyter not
Now that we have a Notebook, we can start training the model with Azure ML SDK.
### 2.5 Training a model with the Azure ML SDK
### 2.5 Training a model
First of all, if you ever have a doubt, refer to the [Azure ML SDK documentation](https://docs.microsoft.com/en-us/python/api/overview/azure/ml/?view=azure-ml-py). In contains all the necessary information to understand the modules we are going to see in this lesson.
To set the AutoML configuration, use the [AutoMLConfig class](https://docs.microsoft.com/en-us/python/api/azureml-train-automl-client/azureml.train.automl.automlconfig(class)?view=azure-ml-py).
As described in the doc, there are a lot of settings with which you can play with. For this project, we will use the following settings:
As described in the doc, there are a lot of parameters with which you can play with. For this project, we will use the following parameters:
- `experiment_timeout_minutes`: The maximum amount of time (in minutes) that the experiment is allowed to run before it is automatically stopped and results are automatically made available
- `max_concurrent_iterations`: The maximum number of concurrent training iterations allowed for the experiment.
- `primary_metric`: The primary metric used to determine the experiment's status.
- `compute_target`: The Azure Machine Learning compute target to run the Automated Machine Learning experiment on.
- `task`: The type of task to run. Values can be 'classification', 'regression', or 'forecasting' depending on the type of automated ML problem to solve.
- `training_data`: The training data to be used within the experiment. It should contain both training features and a label column (optionally a sample weights column).
- `label_column_name`: The name of the label column.
- `path`: The full path to the Azure Machine Learning project folder.
- `enable_early_stopping`: Whether to enable early termination if the score is not improving in the short term.
- `featurization`: Indicator for whether featurization step should be done automatically or not, or whether customized featurization should be used.
- `debug_log`: The log file to write debug information to.
Now that you have your configuration set, you can train the model using the following code. This step can take up to an hour depending on your cluster size.
```python
remote_run = experiment.submit(automl_config)
```
You can run the RunDetails widget to show the different experiments.
```python
from azureml.widgets import RunDetails
RunDetails(remote_run).show()
```
## 3. Model deployment and endpoint consumption with the Azure ML SDK