Skip to content

Github action to move an azure machine learning model to an azure machine learning registry

License

Notifications You must be signed in to change notification settings

coding-kitties/move-azure-machine-learning-model-to-registry

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

register-azure-machine-learning-model

Github Action to register an Azure Machine Learning Model in a registry.

Features:

  • Register a model in an Azure Machine Learning registry
  • Move a model between registries

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: 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: 'playground-registry-resource-group'
          destination_registry_name: 'dev-registry'
          destination_registry_resource_group: 'dev-resource-group'

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} }'
å```

About

Github action to move an azure machine learning model to an azure machine learning registry

Resources

License

Stars

Watchers

Forks

Packages

No packages published