Skip to content

Commit 7e77c0c

Browse files
committed
updating the deployment section - CLI and SDK
1 parent ebc629b commit 7e77c0c

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

articles/machine-learning/how-to-safely-rollout-online-endpoints.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ To define an endpoint, you need to specify:
186186

187187
### Create online endpoint
188188

189-
You'll use the *endpoints/online/managed/sample/endpoint.yml* file to configure the endpoint. The following snippet shows the contents of the file:
189+
Begin by setting the endpoint's name and then configuring it. In this article, you'll use the *endpoints/online/managed/sample/endpoint.yml* file to configure the endpoint. The following snippet shows the contents of the file:
190190

191191
:::code language="yaml" source="~/azureml-examples-main/cli/endpoints/online/managed/sample/endpoint.yml":::
192192

@@ -217,13 +217,19 @@ To create an online endpoint:
217217

218218
### Create the 'blue' deployment
219219

220-
A deployment is a set of resources required for hosting the model that does the actual inferencing. To create a deployment named `blue` for your endpoint, run the following command to use the `blue-deployment.yml` file that contains all the required inputs to configure a deployment:
220+
A deployment is a set of resources required for hosting the model that does the actual inferencing. To create a deployment named `blue` for your endpoint, run the following command to use the `blue-deployment.yml` file to configure the key aspects of the deployment:<!-- [link to "define the deployment" section in Deploy article] -->
221221

222222
:::code language="azurecli" source="~/azureml-examples-main/cli/deploy-safe-rollout-online-endpoints.sh" ID="create_blue":::
223223

224224
> [!IMPORTANT]
225225
> The `--all-traffic` flag in the `az ml online-deployment create` allocates 100% of the endpoint traffic to the newly created blue deployment.
226226
227+
In the `blue-deployment.yaml` file, we specify the `path` (where to upload files from) inline. The CLI automatically uploads the files and registers the model and environment. As a best practice for production, you should register the model and environment and specify the registered name and version separately in the YAML. Use the form `model: azureml:my-model:1` or `environment: azureml:my-env:1`.
228+
229+
For registration, you can extract the YAML definitions of `model` and `environment` into separate YAML files and use the commands `az ml model create` and `az ml environment create`. To learn more about these commands, run `az ml model create -h` and `az ml environment create -h`.
230+
231+
For more information on registering your model as an asset, see [Register your model as an asset in Machine Learning by using the CLI](how-to-manage-models.md#register-your-model-as-an-asset-in-machine-learning-by-using-the-cli). For more information on creating an environment, see [Manage Azure Machine Learning environments with the CLI & SDK (v2)](how-to-manage-environments-v2.md#create-an-environment).
232+
227233
# [Python](#tab/python)
228234

229235
### Create online endpoint
@@ -250,23 +256,18 @@ To create a managed online endpoint, use the `ManagedOnlineEndpoint` class. This
250256

251257
### Create the 'blue' deployment
252258

253-
A deployment is a set of resources required for hosting the model that does the actual inferencing. To create a deployment for your managed online endpoint, use the `ManagedOnlineDeployment` class. This class allows users to configure the following key aspects of the deployment:
254-
255-
**Key aspects of a deployment**
256-
* `name` - Name of the deployment.
257-
* `endpoint_name` - Name of the endpoint to create the deployment under.
258-
* `model` - The model to use for the deployment. This value can be either a reference to an existing versioned model in the workspace or an inline model specification.
259-
* `environment` - The environment to use for the deployment. This value can be either a reference to an existing versioned environment in the workspace or an inline environment specification.
260-
* `code_configuration` - the configuration for the source code and scoring script
261-
* `path`- Path to the source code directory for scoring the model
262-
* `scoring_script` - Relative path to the scoring file in the source code directory
263-
* `instance_type` - The VM size to use for the deployment. For the list of supported sizes, see [Managed online endpoints SKU list](reference-managed-online-endpoints-vm-sku-list.md).
264-
* `instance_count` - The number of instances to use for the deployment
259+
A deployment is a set of resources required for hosting the model that does the actual inferencing. To create a deployment for your managed online endpoint, use the `ManagedOnlineDeployment` class. This class allows users to configure the key aspects of the deployment. <!-- [link to "define the deployment" section in Deploy article] -->
265260

266261
1. Configure blue deployment:
267262

268263
[!notebook-python[](~/azureml-examples-main/sdk/python/endpoints/online/managed/online-endpoints-safe-rollout.ipynb?name=configure_deployment)]
269264

265+
In this example, we specify the `path` (where to upload files from) inline. The SDK automatically uploads the files and registers the model and environment. As a best practice for production, you should register the model and environment and specify the registered name and version separately in the codes.
266+
267+
For more information on registering your model as an asset, see [Register your model as an asset in Machine Learning by using the SDK](how-to-manage-models.md#register-your-model-as-an-asset-in-machine-learning-by-using-the-sdk).
268+
269+
For more information on creating an environment, see [Manage Azure Machine Learning environments with the CLI & SDK (v2)](how-to-manage-environments-v2.md#create-an-environment).
270+
270271
> [!NOTE]
271272
> To create a deployment for a Kubernetes online endpoint, use the `KubernetesOnlineDeployment` class.
272273

0 commit comments

Comments
 (0)