Skip to content

Commit 5cce71b

Browse files
authored
Multimodel SDK examples (#1761)
* Initial commit custom container only * Readme and formatting * Remove dev sub/res/workspace * Workspace name * Change formatting * Add non-custom-container multimodel * Add workflow and readme * Apply black
1 parent aac8c3b commit 5cce71b

6 files changed

+1085
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel
2+
# This file is created by sdk/python/readme.py.
3+
# Please do not edit directly.
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 */8 * * *"
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
- sdk/python/endpoints/online/custom-container/**
13+
- .github/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml
14+
- sdk/python/dev-requirements.txt
15+
- sdk/python/setup.sh
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: check out repo
21+
uses: actions/checkout@v2
22+
- name: setup python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: "3.8"
26+
- name: pip install notebook reqs
27+
run: pip install -r sdk/python/dev-requirements.txt
28+
- name: azure login
29+
uses: azure/login@v1
30+
with:
31+
creds: ${{secrets.AZ_CREDS}}
32+
- name: setup SDK
33+
run: bash setup.sh
34+
working-directory: sdk/python
35+
continue-on-error: true
36+
- name: setup CLI
37+
run: bash setup.sh
38+
working-directory: cli
39+
continue-on-error: true
40+
- name: run endpoints/online/custom-container/online-endpoints-custom-container-multimodel.ipynb
41+
run: |
42+
sed -i -e "s/<SUBSCRIPTION_ID>/6560575d-fa06-4e7d-95fb-f962e74efd7a/g" online-endpoints-custom-container-multimodel.ipynb
43+
sed -i -e "s/<RESOURCE_GROUP>/azureml-examples/g" online-endpoints-custom-container-multimodel.ipynb
44+
sed -i -e "s/<AML_WORKSPACE_NAME>/main/g" online-endpoints-custom-container-multimodel.ipynb
45+
sed -i -e "s/DefaultAzureCredential/AzureCliCredential/g" online-endpoints-custom-container-multimodel.ipynb
46+
47+
papermill -k python online-endpoints-custom-container-multimodel.ipynb online-endpoints-custom-container-multimodel.output.ipynb
48+
working-directory: sdk/python/endpoints/online/custom-container
49+
- name: upload notebook's working folder as an artifact
50+
if: ${{ always() }}
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: online-endpoints-custom-container-multimodel
54+
path: sdk/python/endpoints/online/custom-container
55+
56+
- name: Send IcM on failure
57+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
58+
uses: ./.github/actions/generate-icm
59+
with:
60+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
61+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
62+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
63+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
64+
args: |
65+
incident:
66+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'endpoints/online/custom-container/online-endpoints-custom-container-multimodel.ipynb'"
67+
Summary: |
68+
Notebook 'endpoints/online/custom-container/online-endpoints-custom-container-multimodel.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
69+
Severity: 4
70+
RoutingId: "github://azureml-examples"
71+
Status: Active
72+
Source:
73+
IncidentId: "endpoints/online/custom-container/online-endpoints-custom-container-multimodel.ipynb[${{ github.ref_name }}]"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: sdk-endpoints-online-managed-online-endpoints-multimodel
2+
# This file is created by sdk/python/readme.py.
3+
# Please do not edit directly.
4+
on:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 */8 * * *"
8+
pull_request:
9+
branches:
10+
- main
11+
paths:
12+
- sdk/python/endpoints/online/managed/**
13+
- .github/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml
14+
- sdk/python/dev-requirements.txt
15+
- sdk/python/setup.sh
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: check out repo
21+
uses: actions/checkout@v2
22+
- name: setup python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: "3.8"
26+
- name: pip install notebook reqs
27+
run: pip install -r sdk/python/dev-requirements.txt
28+
- name: azure login
29+
uses: azure/login@v1
30+
with:
31+
creds: ${{secrets.AZ_CREDS}}
32+
- name: setup SDK
33+
run: bash setup.sh
34+
working-directory: sdk/python
35+
continue-on-error: true
36+
- name: setup CLI
37+
run: bash setup.sh
38+
working-directory: cli
39+
continue-on-error: true
40+
- name: run endpoints/online/managed/online-endpoints-multimodel.ipynb
41+
run: |
42+
sed -i -e "s/<SUBSCRIPTION_ID>/6560575d-fa06-4e7d-95fb-f962e74efd7a/g" online-endpoints-multimodel.ipynb
43+
sed -i -e "s/<RESOURCE_GROUP>/azureml-examples/g" online-endpoints-multimodel.ipynb
44+
sed -i -e "s/<AML_WORKSPACE_NAME>/main/g" online-endpoints-multimodel.ipynb
45+
sed -i -e "s/DefaultAzureCredential/AzureCliCredential/g" online-endpoints-multimodel.ipynb
46+
47+
papermill -k python online-endpoints-multimodel.ipynb online-endpoints-multimodel.output.ipynb
48+
working-directory: sdk/python/endpoints/online/managed
49+
- name: upload notebook's working folder as an artifact
50+
if: ${{ always() }}
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: online-endpoints-multimodel
54+
path: sdk/python/endpoints/online/managed
55+
56+
- name: Send IcM on failure
57+
if: ${{ failure() && github.ref_type == 'branch' && (github.ref_name == 'main' || contains(github.ref_name, 'release')) }}
58+
uses: ./.github/actions/generate-icm
59+
with:
60+
host: ${{ secrets.AZUREML_ICM_CONNECTOR_HOST_NAME }}
61+
connector_id: ${{ secrets.AZUREML_ICM_CONNECTOR_CONNECTOR_ID }}
62+
certificate: ${{ secrets.AZUREML_ICM_CONNECTOR_CERTIFICATE }}
63+
private_key: ${{ secrets.AZUREML_ICM_CONNECTOR_PRIVATE_KEY }}
64+
args: |
65+
incident:
66+
Title: "[azureml-examples] Notebook validation failed on branch '${{ github.ref_name }}' for notebook 'endpoints/online/managed/online-endpoints-multimodel.ipynb'"
67+
Summary: |
68+
Notebook 'endpoints/online/managed/online-endpoints-multimodel.ipynb' is failing on branch '${{ github.ref_name }}': ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
69+
Severity: 4
70+
RoutingId: "github://azureml-examples"
71+
Status: Active
72+
Source:
73+
IncidentId: "endpoints/online/managed/online-endpoints-multimodel.ipynb[${{ github.ref_name }}]"

Diff for: sdk/python/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ Test Status is for branch - **_main_**
5353
|assets|environment|[environment](assets/environment/environment.ipynb)|Create custom environments from docker and/or conda YAML|[![environment](https://github.com/Azure/azureml-examples/actions/workflows/sdk-assets-environment-environment.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-assets-environment-environment.yml)|
5454
|assets|model|[model](assets/model/model.ipynb)|Create model from local files, cloud files, Runs|[![model](https://github.com/Azure/azureml-examples/actions/workflows/sdk-assets-model-model.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-assets-model-model.yml)|
5555
|endpoints|batch|[mnist-nonmlflow](endpoints/batch/mnist-nonmlflow.ipynb)|Create and test batch endpoint and deployement|[![mnist-nonmlflow](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-batch-mnist-nonmlflow.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-batch-mnist-nonmlflow.yml)|
56+
|endpoints|online|[online-endpoints-custom-container-multimodel](endpoints/online/custom-container/online-endpoints-custom-container-multimodel.ipynb)|*no description*|[![online-endpoints-custom-container-multimodel](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container-multimodel.yml)|
5657
|endpoints|online|[online-endpoints-custom-container](endpoints/online/custom-container/online-endpoints-custom-container.ipynb)|Deploy a custom container as an online endpoint. Use web servers other than the default Python Flask server used by Azure ML without losing the benefits of Azure ML's built-in monitoring, scaling, alerting, and authentication.|[![online-endpoints-custom-container](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-online-endpoints-custom-container.yml)|
5758
|endpoints|online|[online-endpoints-triton-cc](endpoints/online/custom-container/triton/online-endpoints-triton-cc.ipynb)|Deploy a custom container as an online endpoint. Use web servers other than the default Python Flask server used by Azure ML without losing the benefits of Azure ML's built-in monitoring, scaling, alerting, and authentication.|[![online-endpoints-triton-cc](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-custom-container-triton-online-endpoints-triton-cc.yml)|
5859
|endpoints|online|[kubernetes-online-endpoints-safe-rollout](endpoints/online/kubernetes/kubernetes-online-endpoints-safe-rollout.ipynb)|Safely rollout a new version of a web service to production by rolling out the change to a small subset of users/requests before rolling it out completely|[![kubernetes-online-endpoints-safe-rollout](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-kubernetes-kubernetes-online-endpoints-safe-rollout.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-kubernetes-kubernetes-online-endpoints-safe-rollout.yml)|
5960
|endpoints|online|[kubernetes-online-endpoints-simple-deployment](endpoints/online/kubernetes/kubernetes-online-endpoints-simple-deployment.ipynb)|Use an online endpoint to deploy your model, so you don't have to create and manage the underlying infrastructure|[![kubernetes-online-endpoints-simple-deployment](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-kubernetes-kubernetes-online-endpoints-simple-deployment.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-kubernetes-kubernetes-online-endpoints-simple-deployment.yml)|
6061
|endpoints|online|[debug-online-endpoints-locally-in-visual-studio-code](endpoints/online/managed/debug-online-endpoints-locally-in-visual-studio-code.ipynb)|*no description*|[![debug-online-endpoints-locally-in-visual-studio-code](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-debug-online-endpoints-locally-in-visual-studio-code.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-debug-online-endpoints-locally-in-visual-studio-code.yml)|
6162
|endpoints|online|[online-endpoints-managed-identity-sai](endpoints/online/managed/managed-identities/online-endpoints-managed-identity-sai.ipynb)|*no description* - _This sample is excluded from automated tests_|[![online-endpoints-managed-identity-sai](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-sai.yml)|
6263
|endpoints|online|[online-endpoints-managed-identity-uai](endpoints/online/managed/managed-identities/online-endpoints-managed-identity-uai.ipynb)|*no description* - _This sample is excluded from automated tests_|[![online-endpoints-managed-identity-uai](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-managed-identities-online-endpoints-managed-identity-uai.yml)|
64+
|endpoints|online|[online-endpoints-multimodel](endpoints/online/managed/online-endpoints-multimodel.ipynb)|*no description*|[![online-endpoints-multimodel](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-multimodel.yml)|
6365
|endpoints|online|[online-endpoints-safe-rollout](endpoints/online/managed/online-endpoints-safe-rollout.ipynb)|Safely rollout a new version of a web service to production by rolling out the change to a small subset of users/requests before rolling it out completely|[![online-endpoints-safe-rollout](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-safe-rollout.yml)|
6466
|endpoints|online|[online-endpoints-simple-deployment](endpoints/online/managed/online-endpoints-simple-deployment.ipynb)|Use an online endpoint to deploy your model, so you don't have to create and manage the underlying infrastructure|[![online-endpoints-simple-deployment](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-managed-online-endpoints-simple-deployment.yml)|
6567
|endpoints|online|[online-endpoints-deploy-mlflow-model](endpoints/online/mlflow/online-endpoints-deploy-mlflow-model.ipynb)|Deploy an mlflow model to an online endpoint. This will be a no-code-deployment. It doesn't require scoring script and environment.|[![online-endpoints-deploy-mlflow-model](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-mlflow-online-endpoints-deploy-mlflow-model.yml/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/sdk-endpoints-online-mlflow-online-endpoints-deploy-mlflow-model.yml)|
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: multimodel
2+
channels:
3+
- defaults
4+
dependencies:
5+
- python=3.8
6+
- pip
7+
- pip:
8+
- pandas
9+
- numpy
10+
- scikit-learn
11+
- joblib
12+
- azureml-inference-server-http

0 commit comments

Comments
 (0)