Skip to content

Create Azure Machine Learning Deployment

Actions
Create an Azure Machine Learning Deployment
v0.1.3
Latest
Star (1)

Tags

 (1)

create-azure-machine-learning-deployment

Github Action to create an Azure Machine Learning Online Endpoint

Features:

  • Create an Azure Machine Learning Online Endpoint deployment with the use of a deployment YAML file
  • Update an existing Azure Machine Learning Online Endpoint with use of a deployment YAML file
  • Blue/Green deployment through traffic splitting (Mirroring is also supported)
  • Will automatically scale up/down traffic of new and existing deployments
  • Checks if resource group, workspace and endpoint exist

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:
          deployment_yaml_file_path: "path/to/deployment.yml"
          model_name: "my-model"
          model_version: "1"
          resource_group: "my-resource-group"
          workspace_name: "my-aml-workspace"
          endpoint_name: "my-endpoint"
          registry_name: (optional) "my-registry"
          registry_resource_group: (optional) "my-registry-resource-group"
          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} }'
å```

Create Azure Machine Learning Deployment 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

Create an Azure Machine Learning Deployment
v0.1.3
Latest

Tags

 (1)

Create Azure Machine Learning Deployment 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.