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
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-safely-rollout-online-endpoints.md
+22-14Lines changed: 22 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,14 +154,6 @@ cd azureml-examples/cli/endpoints/online/model-1
154
154
> [!TIP]
155
155
> Use `--depth 1` to clone only the latest commit to the repository, which reduces time to complete the operation.
156
156
157
-
<!-- Open a terminal in the Azure Machine Learning studio:
158
-
159
-
1. Sign into [Azure Machine Learning studio](https://ml.azure.com).
160
-
1. Select your workspace, if it isn't already open.
161
-
1. On the left, select **Notebooks**.
162
-
1. Select **Open terminal**.
163
-
-->
164
-
165
157
### Download files from the examples repository
166
158
167
159
If you cloned the examples repo, your local machine already has copies of the files for this example, and you can skip to the next section. If you didn't clone the repo, you can download it to your local machine.
@@ -381,6 +373,21 @@ This action opens up a window for you to specify details about your endpoint and
381
373
382
374
## Confirm your existing deployment
383
375
376
+
One way to confirm your existing deployment is to invoke your endpoint so that it can score your model for a given input request. When you invoke your endpoint via the CLI or Python SDK, you may choose to specify the name of the deployment that will receive the incoming traffic.
377
+
378
+
> [!NOTE]
379
+
> Unlike the CLI or Python SDK, Azure Machine Learning studio requires you to specify a deployment when you invoke an endpoint.
380
+
381
+
### Invoke endpoint with deployment name
382
+
383
+
If you invoke the endpoint with the name of the deployment that will receive traffic, Azure Machine Learning will route the endpoint's traffic directly to the specified deployment and return its output. You can use the `--deployment-name` option [for CLI v2](/cli/azure/ml/online-endpoint#az-ml-online-endpoint-invoke-optional-parameters), or `deployment_name` option [for SDK v2](/python/api/azure-ai-ml/azure.ai.ml.operations.onlineendpointoperations#azure-ai-ml-operations-onlineendpointoperations-invoke) to specify the deployment.
384
+
385
+
### Invoke endpoint without specifying deployment
386
+
387
+
If you invoke the endpoint without specifying the deployment that will receive traffic, Azure Machine Learning will route the endpoint's incoming traffic to the deployment(s) in the endpoint based on traffic control settings.
388
+
389
+
Traffic control settings allocate specified percentages of incoming traffic to each deployment in the endpoint. For example, if your traffic rules specify that a particular deployment in your endpoint will receive incoming traffic 40% of the time, Azure Machine Learning will route 40% of the endpoint's traffic to that deployment.
390
+
384
391
# [Azure CLI](#tab/azure-cli)
385
392
386
393
You can view the status of your existing endpoint and deployment by running:
@@ -574,9 +581,8 @@ Mirroring has the following limitations:
574
581
Also note the following behaviors:
575
582
576
583
* A deployment can be configured to receive only live traffic or mirrored traffic, not both.
577
-
* When you invoke an endpoint, you can send traffic directly to a deployment by specifying the deployment's name, so that the endpoint returns the output of the deployment—whether it has been configured to receive mirrored traffic or live traffic. You can use the `--deployment-name` option [for CLI v2](/cli/azure/ml/online-endpoint#az-ml-online-endpoint-invoke-optional-parameters), or `deployment_name` option [for SDK v2](/python/api/azure-ai-ml/azure.ai.ml.operations.onlineendpointoperations#azure-ai-ml-operations-onlineendpointoperations-invoke) to specify the deployment.
578
-
> [!NOTE]
579
-
> When you specify the deployment to receive traffic, Azure Machine Learning will not mirror traffic to the shadow deployment. Azure Machine Learning mirrors traffic to the shadow deployment from traffic sent to the endpoint when you don't specify a deployment.
584
+
* When you invoke an endpoint, you can specify the name of any of its deployments — even a shadow deployment — to return the prediction.
585
+
* When you invoke an endpoint with the name of the deployment that will receive incoming traffic, Azure Machine Learning won't mirror traffic to the shadow deployment. Azure Machine Learning mirrors traffic to the shadow deployment from traffic sent to the endpoint when you don't specify a deployment.
580
586
581
587
Now, let's set the green deployment to receive 10% of mirrored traffic. Clients will still receive predictions from the blue deployment only.
582
588
@@ -588,7 +594,7 @@ The following command mirrors 10% of the traffic to the `green` deployment:
You can confirm that the specific percentage of the traffic was sent to the `green` deployment by seeing the logs from the deployment:
@@ -643,7 +649,9 @@ The endpoint details page now shows mirrored traffic allocation of 10% to the `g
643
649
644
650
:::image type="content" source="media/how-to-safely-rollout-managed-endpoints/endpoint-details-showing-mirrored-traffic-allocation.png" alt-text="Endpoint details page showing mirrored traffic allocation in the deployment summary." lightbox="media/how-to-safely-rollout-managed-endpoints/endpoint-details-showing-mirrored-traffic-allocation.png":::
645
651
646
-
Now, when you send requests to the endpoint's URI, 10% of those requests will be routed to the `green` deployment. After testing, you can disable mirroring:
652
+
To test mirrored traffic, see the Azure CLI or Python tabs to invoke the endpoint several times. Confirm that the specific percentage of the traffic was sent to the `green` deployment by seeing the logs from the deployment. You can access the deployment logs from the endpoint's **Deployment logs** tab. You can also use Metrics and Logs to monitor performance of the mirrored traffic. For more information, see [Monitor online endpoints](how-to-monitor-online-endpoints.md).
653
+
654
+
After testing, you can disable mirroring:
647
655
648
656
1. From the endpoint Details page, Select **Update traffic**.
649
657
1. Slide the button next to **Enable mirrored traffic (Preview)** again to disable mirrored traffic.
0 commit comments