Skip to content

Commit dd827b5

Browse files
Merge pull request #213209 from Blackmist/inference-migration
Inference migration
2 parents 4e6276f + 9d4fde2 commit dd827b5

File tree

4 files changed

+121
-5
lines changed

4 files changed

+121
-5
lines changed

articles/machine-learning/how-to-migrate-from-v1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ You can continue using your existing v1 model deployments. For new model deploym
117117
|Azure Kubernetes Service (AKS)|ACI, AKS|Manage your own AKS cluster(s) for model deployment, giving flexibility and granular control at the cost of IT overhead.|
118118
|Azure Arc Kubernetes|N/A|Manage your own Kubernetes cluster(s) in other clouds or on-premises, giving flexibility and granular control at the cost of IT overhead.|
119119

120-
For a comparison of SDK v1 and v2 code, see [Migrate deployment endpoints from SDK v1 to SDK v2](migrate-to-v2-deploy-endpoints.md).
120+
For a comparison of SDK v1 and v2 code, see [Upgrade deployment endpoints to SDK v2](migrate-to-v2-deploy-endpoints.md).
121+
For upgrade steps from your existing ACI web services to managed online endpoints, see our [upgrade guide article](migrate-to-v2-managed-online-endpoints.md) and [blog](https://aka.ms/acimoemigration).
121122

122123
### Jobs (experiments, runs, pipelines in v1)
123124

articles/machine-learning/migrate-to-v2-deploy-endpoints.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.custom: migration
1515

1616
# Upgrade deployment endpoints to SDK v2
1717

18-
We newly introduced [online endpoints](concept-endpoints.md) and batch endpoints as v2 concepts. There are several deployment funnels such as managed online endpoints, [kubernetes online endpoints](how-to-attach-kubernetes-anywhere.md) (including AKS and Arch-enabled Kubernetes) in v2, and ACI and AKS webservices in v1. In this article, we'll focus on the comparison of deploying to ACI webservices (v1) and managed online endpoints (v2).
18+
We newly introduced [online endpoints](concept-endpoints.md) and batch endpoints as v2 concepts. There are several deployment funnels such as managed online endpoints, [kubernetes online endpoints](how-to-attach-kubernetes-anywhere.md) (including Azure Kubernetes Services and Arc-enabled Kubernetes) in v2, and Azure Container Instances (ACI) and Kubernetes Services (AKS) webservices in v1. In this article, we'll focus on the comparison of deploying to ACI webservices (v1) and managed online endpoints (v2).
1919

2020
Examples in this article show how to:
2121

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: Upgrade steps for Container Instances web services to managed online endpoints
3+
titleSuffix: Azure Machine Learning
4+
description: Upgrade steps for Azure Container Instances web services to managed online endpoints in Azure Machine Learning
5+
services: machine-learning
6+
ms.service: machine-learning
7+
ms.subservice: core
8+
ms.topic: reference
9+
author: shohei1029
10+
ms.author: shnagata
11+
ms.date: 09/28/2022
12+
ms.reviewer: blackmist
13+
ms.custom: upgrade
14+
---
15+
16+
# Upgrade steps for Azure Container Instances web services to managed online endpoints
17+
18+
[Managed online endpoints](concept-endpoints.md#what-are-online-endpoints) help to deploy your ML models in a turnkey manner. Managed online endpoints work with powerful CPU and GPU machines in Azure in a scalable, fully managed way. Managed online endpoints take care of serving, scaling, securing, and monitoring your models, freeing you from the overhead of setting up and managing the underlying infrastructure. Details can be found on [Deploy and score a machine learning model by using an online endpoint](how-to-deploy-managed-online-endpoints.md).
19+
20+
You can deploy directly to the new compute target with your previous models and environments, or use the [scripts](https://aka.ms/moeonboard) (preview) provided by us to export the current services and then deploy to the new compute without affecting your existing services. If you regularly create and delete Azure Container Instances (ACI) services, we strongly recommend the deploying directly and not using the scripts.
21+
22+
> [!IMPORTANT]
23+
> The scripts are preview and are provided without a service level agreement.
24+
25+
> [!IMPORTANT]
26+
> **The scoring URL will be changed after upgrade**. For example, the scoring url for ACI web service is like `http://aaaaaa-bbbbb-1111.westus.azurecontainer.io/score`. The scoring URI for a managed online endpoint is like `https://endpoint-name.westus.inference.ml.azure.com/score`.
27+
28+
## Supported scenarios and differences
29+
30+
### Auth mode
31+
No auth isn't supported for managed online endpoint. If you use the upgrade scripts, it will convert it to key auth.
32+
For key auth, the original keys will be used. Token-based auth is also supported.
33+
34+
### TLS
35+
For ACI service secured with HTTPS, you don't need to provide your own certificates anymore, all the managed online endpoints are protected by TLS.
36+
37+
Custom DNS name **isn't** supported.
38+
39+
### Resource requirements
40+
[ContainerResourceRequirements](/python/api/azureml-core/azureml.core.webservice.aci.containerresourcerequirements) isn't supported, you can choose the proper [SKU](reference-managed-online-endpoints-vm-sku-list.md) for your inferencing.
41+
The upgrade tool will map the CPU/Memory requirement to corresponding SKU. If you choose to redeploy manually through CLI/SDK V2, we also suggest the corresponding SKU for your new deployment.
42+
43+
| CPU request | Memory request in GB | Suggested SKU |
44+
| :----| :---- | :---- |
45+
| (0, 1] | (0, 1.2] | DS1 V2 |
46+
| (1, 2] | (1.2, 1.7] | F2s V2 |
47+
| (1, 2] | (1.7, 4.7] | DS2 V2 |
48+
| (1, 2] | (4.7, 13.7] | E2s V3 |
49+
| (2, 4] | (0, 5.7] | F4s V2 |
50+
| (2, 4] | (5.7, 11.7] | DS3 V2 |
51+
| (2, 4] | (11.7, 16] | E4s V3 |
52+
53+
"(" means greater than and "]" means less than or equal to. For example, “(0, 1]” means “greater than 0 and less than or equal to 1”.
54+
55+
> [!IMPORTANT]
56+
> When upgrading from ACI, there will be some changes in how you'll be charged. See [our blog](https://aka.ms/acimoemigration) for a rough cost comparison to help you choose the right VM SKUs for your workload.
57+
58+
### Network isolation
59+
For private workspace and VNet scenarios, see [Use network isolation with managed online endpoints (preview)](how-to-secure-online-endpoint.md?tabs=model).
60+
61+
> [!IMPORTANT]
62+
> As there are many settings for your workspace and VNet, we strongly suggest that redeploy through the Azure CLI extension v2 for machine learning instead of the script tool.
63+
64+
## Not supported
65+
+ [EncryptionProperties](/python/api/azureml-core/azureml.core.webservice.aci.encryptionproperties) for ACI container isn't supported.
66+
+ ACI web services deployed through deploy_from_model and deploy_from_image isn't supported by the upgrade tool. Redeploy manually through CLI/SDK V2.
67+
68+
## Upgrade steps
69+
70+
### With our [CLI](how-to-deploy-managed-online-endpoints.md) or [SDK preview](how-to-deploy-managed-online-endpoint-sdk-v2.md)
71+
Redeploy manually with your model files and environment definition.
72+
You can find our examples on [azureml-examples](https://github.com/Azure/azureml-examples). Specifically, this is the [SDK example for managed online endpoint](https://github.com/Azure/azureml-examples/tree/main/sdk/python/endpoints/online/managed).
73+
74+
### With our [upgrade tool](https://aka.ms/moeonboard) (preview)
75+
This tool will automatically create new managed online endpoint based on your existing web services. Your original services won't be affected. You can safely route the traffic to the new endpoint and then delete the old one.
76+
77+
Use the following steps to run the scripts:
78+
79+
> [!TIP]
80+
> The new endpoint created by the scripts will be created under the same workspace.
81+
82+
1. Use a bash shell to run the scripts. For example, a terminal session on Linux or the Windows Subsystem for Linux (WSL).
83+
2. Install [Python SDK V1](/python/api/overview/azure/ml/install) to run the python script.
84+
3. Install [Azure CLI](/cli/azure/install-azure-cli).
85+
4. Clone the repository to your local env. For example, `git clone https://github.com/Azure/azureml-examples`.
86+
5. Edit the following values in the `migrate-service.sh` file. Replace the values with ones that apply to your configuration.
87+
88+
* `<SUBSCRIPTION_ID>` - The subscription ID of your Azure subscription that contains your workspace.
89+
* `<RESOURCEGROUP_NAME>` - The resource group that contains your workspace.
90+
* `<WORKSPACE_NAME>` - The workspace name.
91+
* `<SERVICE_NAME>` - The name of your existing ACI service.
92+
* `<LOCAL_PATH>` - A local path where resources and templates used by the script are downloaded.
93+
* `<NEW_ENDPOINT_NAME>` - The name of the new endpoint that will be created. We recommend that the new endpoint name is different from the previous service name. Otherwise, the original service won't be displayed if you check your endpoints on the portal.
94+
* `<NEW_DEPLOYMENT_NAME>` - The name of the deployment to the new endpoint.
95+
6. Run the bash script. For example, `./migrate-service.sh`. It will take about 5-10 minutes to finish the new deployment.
96+
97+
> [!TIP]
98+
> If you receive an error that the script is not executable, or an editor opens when you try to run the script, use the following command to mark the script as executable:
99+
> ```bash
100+
> chmod +x migrate-service.sh
101+
> ```
102+
7. After the deployment is completes successfully, you can verify the endpoint with the [az ml online-endpoint invoke](/cli/azure/ml/online-endpoint#az-ml-online-endpoint-invoke) command.
103+
104+
## Contact us
105+
If you have any questions or feedback on the upgrade script, contact us at [email protected].
106+
107+
## Next steps
108+
109+
* [What are Azure Machine Learning endpoints?](concept-endpoints.md)
110+
* [Deploy and score a model with managed online endpoints](how-to-deploy-managed-online-endpoints.md)

articles/machine-learning/toc.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,14 @@
5757
- name: "Pipelines"
5858
displayName: migration, v1, v2
5959
href: migrate-to-v2-execution-pipeline.md
60-
- name: "Upgrade endpoints"
61-
displayName: migration, v1, v2
62-
href: migrate-to-v2-deploy-endpoints.md
60+
- name: Upgrade endpoints
61+
items:
62+
- name: "Online endpoints"
63+
displayName: migration, v1, v2
64+
href: migrate-to-v2-deploy-endpoints.md
65+
- name: "Upgrade from ACI webs services to managed online endpoints"
66+
displayName: migration, v1, v2
67+
href: migrate-to-v2-managed-online-endpoints.md
6368
- name: Quickstart
6469
expanded: true
6570
items:

0 commit comments

Comments
 (0)