Skip to content

Commit

Permalink
Rename MLFlow Sample to NCD (Azure#2069)
Browse files Browse the repository at this point in the history
* Init

* Readme
  • Loading branch information
xanwal committed Feb 9, 2023
1 parent 3104d45 commit d99da3b
Show file tree
Hide file tree
Showing 19 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
# Any manual changes to this file may cause incorrect behavior.
# Any manual changes will be overwritten if the code is regenerated.

name: cli-scripts-deploy-managed-online-endpoint-mlflow
name: cli-scripts-deploy-managed-online-endpoint-ncd
on:
workflow_dispatch:
schedule:
- cron: "38 2/12 * * *"
- cron: "6 0/12 * * *"
pull_request:
branches:
- main
paths:
- cli/deploy-managed-online-endpoint-mlflow.sh
- cli/deploy-managed-online-endpoint-ncd.sh
- infra/**
- .github/workflows/cli-scripts-deploy-managed-online-endpoint-mlflow.yml
- .github/workflows/cli-scripts-deploy-managed-online-endpoint-ncd.yml
- cli/setup.sh
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -45,5 +45,5 @@ jobs:
run: |
source "${{ github.workspace }}/infra/sdk_helpers.sh";
source "${{ github.workspace }}/infra/init_environment.sh";
set -e; bash -x deploy-managed-online-endpoint-mlflow.sh
set -e; bash -x deploy-managed-online-endpoint-ncd.sh
working-directory: cli
2 changes: 1 addition & 1 deletion cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ path|status|
[deploy-local-endpoint.sh](deploy-local-endpoint.sh)|[![deploy-local-endpoint](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-local-endpoint/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-local-endpoint.yml)
[deploy-managed-online-endpoint-access-resource-sai.sh](deploy-managed-online-endpoint-access-resource-sai.sh)|[![deploy-managed-online-endpoint-access-resource-sai](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-managed-online-endpoint-access-resource-sai/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-managed-online-endpoint-access-resource-sai.yml)
[deploy-managed-online-endpoint-access-resource-uai.sh](deploy-managed-online-endpoint-access-resource-uai.sh)|[![deploy-managed-online-endpoint-access-resource-uai](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-managed-online-endpoint-access-resource-uai/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-managed-online-endpoint-access-resource-uai.yml)
[deploy-managed-online-endpoint-mlflow.sh](deploy-managed-online-endpoint-mlflow.sh)|[![deploy-managed-online-endpoint-mlflow](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-managed-online-endpoint-mlflow/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-managed-online-endpoint-mlflow.yml)
[deploy-managed-online-endpoint-ncd.sh](deploy-managed-online-endpoint-ncd.sh)|[![deploy-managed-online-endpoint-ncd](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-managed-online-endpoint-ncd/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-managed-online-endpoint-ncd.yml)
[deploy-managed-online-endpoint.sh](deploy-managed-online-endpoint.sh)|[![deploy-managed-online-endpoint](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-managed-online-endpoint/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-managed-online-endpoint.yml)
[deploy-mlcompute-create_with-system-identity.sh](deploy-mlcompute-create_with-system-identity.sh)|[![deploy-mlcompute-create_with-system-identity](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-mlcompute-create_with-system-identity/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-mlcompute-create_with-system-identity.yml)
[deploy-mlcompute-update-to-system-identity.sh](deploy-mlcompute-update-to-system-identity.sh)|[![deploy-mlcompute-update-to-system-identity](https://github.com/Azure/azureml-examples/workflows/cli-scripts-deploy-mlcompute-update-to-system-identity/badge.svg?branch=main)](https://github.com/Azure/azureml-examples/actions/workflows/cli-scripts-deploy-mlcompute-update-to-system-identity.yml)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
set -e


# <set_endpoint_name>
export ENDPOINT_NAME="<YOUR_ENDPOINT_NAME>"
# </set_endpoint_name>

# endpoint name
export ENDPOINT_NAME=endpt-mlflow-`echo $RANDOM`
AML_MODEL_NAME=mir-sample-sklearn-mlflow-model
export ENDPOINT_NAME=endpt-ncd-`echo $RANDOM`
AML_MODEL_NAME=mir-sample-sklearn-ncd-model
echo $AML_MODEL_NAME


# <create_endpoint>
az ml online-endpoint create --name $ENDPOINT_NAME -f endpoints/online/mlflow/create-endpoint.yaml
az ml online-endpoint create --name $ENDPOINT_NAME -f endpoints/online/ncd/create-endpoint.yaml
# </create_endpoint>

# check if create was successful
Expand All @@ -30,7 +28,7 @@ fi
model_archive=$(az ml model archive -n $AML_MODEL_NAME --version 1 || true)

# <create_sklearn_deployment>
az ml online-deployment create --name sklearn-deployment --endpoint $ENDPOINT_NAME -f endpoints/online/mlflow/sklearn-deployment.yaml --all-traffic
az ml online-deployment create --name sklearn-deployment --endpoint $ENDPOINT_NAME -f endpoints/online/ncd/sklearn-deployment.yaml --all-traffic
# </create_sklearn_deployment>

deploy_status=`az ml online-deployment show --name sklearn-deployment --endpoint $ENDPOINT_NAME --query "provisioning_state" -o tsv`
Expand All @@ -44,11 +42,11 @@ else
fi

# <test_sklearn_deployment>
az ml online-endpoint invoke --name $ENDPOINT_NAME --request-file endpoints/online/mlflow/sample-request-sklearn.json
az ml online-endpoint invoke --name $ENDPOINT_NAME --request-file endpoints/online/ncd/sample-request-sklearn.json
# </test_sklearn_deployment>

# <create_lightgbm_deployment>
az ml online-deployment create --name lightgbm-deployment --endpoint $ENDPOINT_NAME -f endpoints/online/mlflow/lightgbm-deployment.yaml
az ml online-deployment create --name lightgbm-deployment --endpoint $ENDPOINT_NAME -f endpoints/online/ncd/lightgbm-deployment.yaml
# </create_lightgbm_deployment>

deploy_status=`az ml online-deployment show --name lightgbm-deployment --endpoint $ENDPOINT_NAME --query "provisioning_state" -o tsv`
Expand All @@ -62,7 +60,7 @@ else
fi

# <test_lightgbm_deployment>
az ml online-endpoint invoke --name $ENDPOINT_NAME --deployment lightgbm-deployment --request-file endpoints/online/mlflow/sample-request-lightgbm.json
az ml online-endpoint invoke --name $ENDPOINT_NAME --deployment lightgbm-deployment --request-file endpoints/online/ncd/sample-request-lightgbm.json
# </test_lightgbm_deployment>

# cleanup of model
Expand Down

0 comments on commit d99da3b

Please sign in to comment.