Skip to content

Update Azure Machine Learning Endpoint

Actions
Update an Azure Machine Learning Endpoint
v0.1.0
Latest
Star (1)

update-azure-machine-learning-endpoint

Github Action to update an Azure Machine Learning Online Endpoint

Features:

  • Update the traffic distribution of an Azure Machine Learning Online Endpoint
  • Supports blue/green deployments

For other Azure Machine Learning actions check out:

Dependencies on other Github Actions

🚀 Usage

1. Add to Your Workflow

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]

      - uses: Azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      - name: Create AML Online Endpoint
        uses: coding-kitties/[email protected]
        with:
          resource_group: "my-resource-group"
          workspace_name: "my-aml-workspace"
          endpoint_name: "my-endpoint"
          traffic: '{ "blue": 80, "green": 20, mirror": {"green": 80} }'

Example deployment of an Azure Machine Learning Workflow with blue/green deployments

This example demonstrates an Azure Machine Learning Deployment with blue/green deployments for different environments. We use various Github Actions to create a complete workflow.

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]

      - uses: Azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      # Move model into dev registry (Will be skipped if it already exists)
      - name: Register model in registry
        uses: coding-kitties/[email protected]
        with:
          model_name: 'model-name'
          model_version: '1'
          source_registry_name: 'playground-registry'
          source_registry_resource_group: 'my-registry-resource-group'
          destination_registry_name: 'playground-registry'
          destination_registry_resource_group: 'my-registry-resource-group'

      # Create AML Online Endpoint in DEV (Will be skipped if it already exists)
      - name: Create AML Online Endpoint DEV
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'dev-endpoint'
          resource_group: 'dev-group'
          workspace_name: 'dev-workspace'

      # Deploy the new green model to DEV
      - name: Create AML Online Endpoint Deployment DEV
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'dev-endpoint'
          resource_group: 'dev-group'
          workspace_name: 'dev-workspace'
          deployment_yaml_file_path: 'path/to/deployment.yml'
          model_name: 'model-name'
          model_version: '1'
          traffic: '{ "green": 0, "blue": 100, mirror": {"green": 20} }'

      # Update green deployment traffic in DEV
      - name: Update AML Online Endpoint Deployment traffic
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'my-endpoint'
          workspace_name: 'my-workspace'
          resource_group: 'my-resource-group'
          traffic: '{ "green": 100, "blue": 0, mirror": {"green": 0} }'

      - name: Delete AML Online Endpoint Deployment DEV
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'dev-endpoint'
          resource_group: 'dev-group'
          workspace_name: 'dev-workspace'
          deployment_name: 'blue'

      # Move model to production registy
      - name: Move model to production registry
        uses: coding-kitties/[email protected]
        with:
          model_name: 'model-name'
          model_version: '1'
          source_registry_name: 'playground-registry'
          source_registry_resource_group: 'my-registry-resource-group'
          destination_registry_name: 'production-registry'
          destination_registry_resource_group: 'my-registry-resource-group'

      # Create AML Online Endpoint in PROD (Will be skipped if it already exists)
      - name: Create AML Online Endpoint PROD
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'prod-endpoint'
          resource_group: 'prod-group'
          workspace_name: 'prod-workspace'

      # Deploy the new green model to PROD
      - name: Create AML Online Endpoint Deployment PROD
        uses: coding-kitties/[email protected]
        with:
          endpoint_name: 'prod-endpoint'
          resource_group: 'prod-group'
          workspace_name: 'prod-workspace'
          deployment_yaml_file_path: 'path/to/deployment.yml'
          model_name: 'model-name'
          model_version: '1'
          traffic: '{ "green": 0, "blue": 100, mirror": {"green": 20} }'

Update Azure Machine Learning Endpoint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Update an Azure Machine Learning Endpoint
v0.1.0
Latest

Update Azure Machine Learning Endpoint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.