You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this article, you learn how to deploy an AutoML-trained machine learning model to an online real-time inference endpoint. Automated machine learning, also referred to as automated ML or AutoML, is the process of automating the time-consuming, iterative tasks of developing a machine learning model. For more information, see [What is automated machine learning (AutoML)?](concept-automated-ml.md).
21
+
In this article, you learn how to deploy an AutoML-trained machine learning model to an online real-time inference endpoint. Automated machine learning, also referred to as automated ML or AutoML, is the process of automating the time-consuming, iterative tasks of developing a machine learning model. For more information, see [What is automated machine learning (AutoML)?](concept-automated-ml.md)
22
22
23
23
In the following sections, you learn how to deploy AutoML trained machine learning model to online endpoints using:
24
24
@@ -36,10 +36,10 @@ Deploying an AutoML-trained model from the Automated ML page is a no-code experi
36
36
37
37
1. In Azure Machine Learning studio, go to the **Automated ML** page.
38
38
1. Select your experiment and run it.
39
-
1. Choose the **Models + child** jobs tab.
39
+
1. Choose the **Models + child jobs** tab.
40
40
1. Select the model that you want to deploy.
41
41
1. After you select a model, the **Deploy** button is available with a dropdown menu.
@@ -53,18 +53,18 @@ If you want to have more control over the deployment, you can download the train
53
53
54
54
To download the components, you need for deployment:
55
55
56
-
1. Go to your Automated ML experiment and run in your machine learning workspace.
56
+
1. Go to your Automated ML experiment and run it in your machine learning workspace.
57
57
1. Choose the **Models + child jobs** tab.
58
-
1. Select the model you want to use. After you select a model, the *Download* button is enabled.
58
+
1. Select the model you want to use. After you select a model, the **Download** button is enabled.
59
59
1. Choose **Download**.
60
60
61
61
:::image type="content" source="media/how-to-deploy-automl-endpoint/download-model.png" lightbox="media/how-to-deploy-automl-endpoint/download-model.png" alt-text="Screenshot showing the selection of the model and download button.":::
62
62
63
-
You receive a zip file that contains:
63
+
You receive a *.zip* file that contains:
64
64
65
-
- A conda environment specification file named `conda_env_<VERSION>.yml`
66
-
- A Python scoring file named `scoring_file_<VERSION>.py`
67
-
- The model itself, in a Python `.pkl` file named `model.pkl`
65
+
- A conda environment specification file named *conda_env_<VERSION>.yml*
66
+
- A Python scoring file named *scoring_file_<VERSION>.py*
67
+
- The model itself, in a Python *.pkl* file named *model.pkl*
68
68
69
69
To deploy using these files, you can use either the studio or the Azure CLI.
70
70
@@ -73,8 +73,8 @@ To deploy using these files, you can use either the studio or the Azure CLI.
73
73
1. In Azure Machine Learning studio, go to the **Models** page.
74
74
1. Select Select **+ Register** > **From local files**.
75
75
1. Register the model you downloaded from Automated ML run.
76
-
1. Go to Environments page, select Custom environment, and select + Create option to create an environment for your deployment. Use the downloaded conda yaml to create a custom environment.
77
-
1. Select the model, and from the Deploy drop-down option, select Deploy to real-time endpoint.
76
+
1. Go to the Environments page, select **Custom environment**, and select **+ Create** to create an environment for your deployment. Use the downloaded conda yaml to create a custom environment.
77
+
1. Select the model, and from the D**eploy** dropdown menu, select **Real-time endpoint**.
78
78
1. Complete all the steps in wizard to create an online endpoint and deployment.
79
79
80
80
# [Azure CLI](#tab/cli)
@@ -97,40 +97,40 @@ If you receive an error message or you don't see `Extensions: ml` in the respons
Create a directory called `src/` and place the scoring file that you downloaded into it. This directory is uploaded to Azure and contains all the source code necessary to do inference. For an AutoML model, there's just the single scoring file.
106
+
Create a directory called *src*. Save the scoring file that you downloaded to it. This directory is uploaded to Azure and contains all the source code necessary to do inference. For an AutoML model, there's just the single scoring file.
107
107
108
108
### Create the endpoint and deployment yaml file
109
109
110
110
To create an online endpoint from the command line, create an *endpoint.yml* and a *deployment.yml* file. The following code, taken from the [Azure Machine Learning Examples repo](https://github.com/Azure/azureml-examples), shows the *endpoints/online/managed/sample/*, which captures all the required inputs.
You need to modify this file to use the files you downloaded from the AutoML Models page.
121
121
122
-
1. Create a file `automl_endpoint.yml` and `automl_deployment.yml` and paste the contents of the preceding examples.
122
+
1. Create a file *automl_endpoint.yml* and *automl_deployment.yml* and paste the contents of the preceding examples.
123
123
124
124
1. Change the value of the `name` of the endpoint. The endpoint name needs to be unique within the Azure region. The name for an endpoint must start with an upper- or lowercase letter and only consist of '-'s and alphanumeric characters.
125
125
126
-
1. In the `automl_deployment` file, change the value of the keys at the following paths.
126
+
1. In the *automl_deployment.yml* file, change the value of the keys at the following paths.
127
127
128
128
| Path | Change to |
129
129
|:---- |:--------- |
130
-
|`model:path`| The path to the `model.pkl` file you downloaded. |
130
+
|`model:path`| The path to the *model.pkl* file you downloaded. |
131
131
|`code_configuration:code:path`| The directory in which you placed the scoring file. |
132
-
|`code_configuration:scoring_script`| The name of the Python scoring file (`scoring_file_<VERSION>.py`). |
133
-
|`environment:conda_file`| A file URL for the downloaded conda environment file (`conda_env_<VERSION>.yml`). |
132
+
|`code_configuration:scoring_script`| The name of the Python scoring file (*scoring_file_\<VERSION>.py*). |
133
+
|`environment:conda_file`| A file URL for the downloaded conda environment file (*conda_env_\<VERSION>.yml*). |
134
134
135
135
> [!NOTE]
136
136
> For a full description of the YAML, see [Online endpoint YAML reference](reference-yaml-endpoint-online.md).
@@ -162,7 +162,7 @@ For more information, see [Install the Azure Machine Learning SDK v2 for Python]
162
162
163
163
### Put the scoring file in its own directory
164
164
165
-
Create a directory called `src/` and place the scoring file you downloaded into it. This directory is uploaded to Azure and contains all the source code necessary to do inference. For an AutoML model, there's just the single scoring file.
165
+
Create a directory called *src*. Save the scoring file that you downloaded to it. This directory is uploaded to Azure and contains all the source code necessary to do inference. For an AutoML model, there's just the single scoring file.
166
166
167
167
### Connect to Azure Machine Learning workspace
168
168
@@ -199,7 +199,7 @@ Create a directory called `src/` and place the scoring file you downloaded into
199
199
200
200
### Create the endpoint and deployment
201
201
202
-
Next, create the managed online endpoints and deployments.
202
+
Create the managed online endpoints and deployments.
203
203
204
204
1. Configure online endpoint.
205
205
@@ -253,26 +253,26 @@ Next, create the managed online endpoints and deployments.
253
253
)
254
254
```
255
255
256
-
In this example, the files you downloaded from the AutoML Models page are in the `src` directory. You can modify the parameters in the code to suit your situation.
256
+
In this example, the files you downloaded from the AutoML Models page are in the *src* directory. You can modify the parameters in the code to suit your situation.
257
257
258
258
| Parameter | Change to |
259
259
|:---------|:---------|
260
-
|`model:path`| The path to the `model.pkl`file you downloaded. |
260
+
|`model:path`| The path to the *model.pkl*file you downloaded. |
261
261
|`code_configuration:code:path`| The directory in which you placed the scoring file. |
262
-
|`code_configuration:scoring_script`| The name of the Python scoring file (`scoring_file_<VERSION>.py`). |
263
-
|`environment:conda_file`| A fileURLfor the downloaded conda environment file (`conda_env_<VERSION>.yml`). |
262
+
|`code_configuration:scoring_script`| The name of the Python scoring file (*scoring_file_\<VERSION>.py*). |
263
+
|`environment:conda_file`| A fileURLfor the downloaded conda environment file (*conda_env_\<VERSION>.yml*). |
264
264
265
265
1. Create the deployment.
266
266
267
-
Using the `MLClient` created earlier, create the deployment in the workspace. This command starts the deployment creation andreturn a confirmation response while the deployment creation continues.
267
+
Using the `MLClient` created earlier, create the deployment in the workspace. This command starts creating the deployment. It returns a confirmation response while the deployment creation continues.
268
268
269
269
```python
270
270
ml_client.begin_create_or_update(blue_deployment)
271
271
```
272
272
273
273
After you create a deployment, you can score it as described in [Test the endpoint with sample data](how-to-deploy-managed-online-endpoint-sdk-v2.md#test-the-endpoint-with-sample-data).
274
274
275
-
You can learn to deploy to managed online endpoints with SDK more in[Deploy and score a machine learning model by using an online endpoint](how-to-deploy-managed-online-endpoint-sdk-v2.md).
275
+
To learn more about deploying to managed online endpoints withSDK, see [Deploy and score a machine learning model by using an online endpoint](how-to-deploy-managed-online-endpoint-sdk-v2.md).
0 commit comments