Home
Softono
a

azure

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
9

Software by azure

MachineLearningNotebooks
Open Source

MachineLearningNotebooks

MachineLearningNotebooks is a comprehensive collection of Python notebooks designed for machine learning and deep learning practitioners. These notebooks provide practical, ready-to-run examples that demonstrate how to build, train, evaluate, and deploy models using the Azure Machine Learning Python SDK. The library covers a wide range of topics from basic data preprocessing and exploratory analysis to advanced neural network architectures and distributed training scenarios. Users can leverage these resources to quickly prototype algorithms, understand best practices, and integrate Azure ML capabilities into their workflows. Content includes step-by-step guides for creating compute targets, managing datasets, configuring experiments, registering models, and deploying endpoints for real-time or batch scoring. Ideal for data scientists, developers, and students, this toolkit accelerates the learning curve for cloud-based AI development while ensuring consistency with Microsoft Azure's latest features and securi

Education & Learning ML Frameworks
4.4K Github Stars
gen-cv
Open Source

gen-cv

# Vision AI Solution Accelerator <img src="./media/gen-cv.png" alt="drawing" style="width:1200px;"/> This repository serves as a rich resource offering numerous examples of synthetic image generation, manipulation, and reasoning. Utilizing Azure Machine Learning, Computer Vision, OpenAI, and widely acclaimed open-source frameworks like Stable Diffusion, it equips users with practical insights into the application of these powerful tools in the realm of image processing. ### Content - 🆕[Azure OpenAI Vision Fine-tuning for video analysis](vision-fine-tuning/02-AOAI-video-fine-tuning/README.md) - 🆕[Azure OpenAI Vision Fine-tuning starter](vision-fine-tuning/01-AOAI-vision-fine-tuning-starter/README.md) - 🆕 [Guided Content Generation](guided-content-generation/README.md) - [Find and analyze Videos using GPT4-Vision with Video Enhancements](video/README.md) - [Create engagaing Avatar Videos](avatar/video/README.md) - [Create interactive Avatar Experiences](avatar/interactive/readme.md) - [Stable Diffusion XL with Azure Machine Learning](sdxl-azureml/sdxl-on-azureml.ipynb) - [Azure Computer Vision in a Day Workshop](azure_computer_vision_workshop/README.md) - [Explore the OpenAI DALL E-2 API](dalle2-api/DALLE2-api-intro.ipynb) - [Create images with the Azure OpenAI DALL E-2 API](dalle2-api/Florence-AOAI-DALLE2.ipynb) - [Remove background from images using the Florence foundation model](dalle2-api/Remove-background.ipynb) - [Precise Inpainting with Segment Anything, DALLE-2 and Stable Diffusion](dalle2-api/DALLE2-Segment-Anything-edits.ipynb) - [Add custom objects and styles to image generation models with Dreambooth](generation-finetuning/README.md) - [Create and find images with Stable Diffusion and Florence Vector Search](image-embeddings/generate-and-search-images.ipynb) - [Manage image embeddings with the Cognitive Search Vector Store](image-embeddings/image-search-embeddings.ipynb) ### Getting Started The code within this repository has been tested on both __Github Codespaces__ compute and an __Azure Machine Learning Compute Instance__. Although the use of a GPU is not a requirement, it is highly recommended if you aim to generate a large number of sample images using Stable Diffusion. Follow these steps to get started: 1. Clone this repository on your preferred compute using the following command: ```bash git clone https://github.com/Azure/gen-cv.git ``` 2. Create your Python environment and install the necessary dependencies. For our development, we utilized Conda. You can do the same with these commands: ```bash conda create -n gen-cv python=3.10 conda activate gen-cv pip install -r requirements.txt ``` 3. From the list provided above, select a sample notebook. After making your selection, configure the Jupyter notebook to use the kernel associated with the environment you set up in Step 2. 4. Copy the `.env.template` file to `.env` to store your parameters: ```bash cp .env.template .env ``` 5. Add the required parameters and keys for your services to the `.env` file. ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. ## Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

AI & Machine Learning ML Frameworks
433 Github Stars
AI-in-a-Box
Open Source

AI-in-a-Box

# AI-in-a-Box <p align="center"> <img src="media/images/ai-in-a-box.png" alt="FTA AI-in-a-Box: Deployment Accelerator" style="width: 15%" /> </p> *AI-in-a-Box* leverages the collective expertise of Microsoft Customer Engineers and Architects across the globe to develop and provide AI and ML solutions to the technical community. Our intent is to present a curated collection of solution accelerators that can help engineers establish their AI/ML environments and solutions rapidly and with minimal friction, while maintaining the highest standards of quality and efficiency. As we continue to learn from the market, the contributors will look to equip the community with the tools and resources necessary to succeed in the ever-evolving AI and ML landscape. ## Why AI-in-a-Box? * Accelerated Deployment: Speed up your solutions with our proven, ready-to-use patterns. * Cost Savings: Maximize your budget by reusing existing code and patterns. * Enhanced Quality & Reliability: Trust in our solutions, validated through real-world scenarios. * Competitive Advantage: Outpace competitors by accelerating solution deployment. <p align="center"> ![FTA AI-in-a-Box: Deployment Accelerator](/media/images/aibxtable.png) </p> ## Available Guidance |Topic|Description| |---|---| |[Responsible AI](./guidance/responsible-ai/) | This provides essential guidance on the responsible use of AI and LLM technologies. | |[Security for Generative AI Applications](./guidance/genai-security/)| This document provides specific security guidance for Generative AI (GenAI) applications. | |[Scaling OpenAI Applications](./guidance/scaling/)| This document contains best practices for scaling OpenAI applications within Azure. | ## Available “-in-a-Box” accelerators |Pattern|Description|Supported Use Cases and Features| |---|---|---| |[Azure ML Operationalization in-a-box](https://github.com/Azure-Samples/ml-ops-in-a-box)|Boilerplate Data Science project from model development to deployment and monitoring|<li>End-to-end MLOps project template <li>Outer Loop (infrastructure setup) <br /><li>Inner Loop (model creation and deployment lifecycle)| |[Edge AI in-a-box](./edge-ai/)|Edge AI from model creation to deployment on Edge Device(s) |<li>Create a model and deploy to Edge Device.<li>Outer Loop Infrastructure Setup (IoT Hub, IoT Edge, Edge VM, Container Registry, Azure ML) <br /><li>Inner Loop (model creation and deployment)| |[AML Edge in-a-box](https://github.com/Azure-Samples/aml-edge-in-a-box)|Edge AI from model creation to deployment on Edge Device(s) |Orchestrate the entire Edge AI model lifecycle—from creation to deployment—using Azure ML, IoT Edge, and IoT Hub, while leveraging Azure ML CLI V2 for streamlined management.| |[Custom Vision Edge in-a-box](https://github.com/Azure-Samples/customvision-edge-in-a-box)|Edge AI from model creation to deployment on Edge Device(s) |Edge AI mitigates cloud latency by shifting analysis closer to the data source for faster responses. This accelerator demonstrates using [Custom Vision](https://www.customvision.ai/) to train a model and export it in formats like ONNX or Dockerfile for edge deployment.| |[Doc Intelligence in-a-box](https://github.com/Azure-Samples/doc-intelligence-in-a-box) | This accelerator enables companies to automate PDF form processing, modernize operations, save time, and cut costs as part of their digital transformation journey.|<li>Receive PDF Forms<br /><li>Function App and Logic App for Orchestration<br /><li>Document Intelligence Model creation for form processing and content extraction <br /><li> Saves PDF data in Azure Cosmos DB | |[Image and Video Analysis in-a-box](https://github.com/Azure-Samples/gpt-video-analysis-in-a-box) | Extracts information from images and videos with Azure AI Vision and sends the results along with the prompt and system message to Azure GPT-4 Turbo with Vision. |<li>Orchestration through Azure Data Factory<br /><li>Low code solution, easily extensible for your own use cases through ADF parameters<br /><li> Reuse same solution and deployed resources for many different scenarios<br /><li> Saves GPT4-V results to Azure CosmosDB| |[Cognitive Services Landing Zone in-a-box](https://github.com/Azure-Samples/ai-landing-zone-in-a-box)|Minimal enterprise-ready networking and AI Services setup to support most Cognitive Services scenarios in a secure environment|<li>Hub-and-Spoke Vnet setup and peering <br /><li>Cognitive Service deployment <br /><li>Private Endpoint setup <br /><li>Private DNS integration with PaaS DNS resolver| |[Semantic Kernel Bot in-a-box](https://github.com/Azure-Samples/gen-ai-bot-in-a-box)|Extendable solution accelerator for advanced Azure OpenAI Bots|<li>Deploy Azure OpenAI bot to multiple channels (Web, Teams, Slack, etc) <br /><li>Built-in Retrieval-Augmented Generation (RAG) support <br /><li>Implement custom AI Plugins| [NLP to SQL in-a-box](https://github.com/Azure-Samples/nlp-sql-in-a-box)|Unleash the power of a cutting-edge speech-enabled SQL query system with Azure OpenAI, Semantic Kernel, and Azure Speech Services. Simply speak your data requests in natural language, and let the magic happen.|<li>Allows users to verbally express natural language queries <br /> <li>Translate into SQL statements using Azure Speech & AOAI<br /><li> Execute on an Azure SQL DB | |[Assistants API notebooks](./gen-ai/Assistants/notebooks)|Harnessing the simplicity of the Assistants API, developers can seamlessly integrate assistants with diverse functionalities, from executing code to retrieving data, empowering users with versatile and dynamic digital assistants tailored to their needs.| <li>Offers three main capabilities: Code Interpreter (tech tasks), Retrieval (finding info), and Function calling (task execution) <br /><li>These powers combine to form a versatile super-assistant for handling diverse tasks | |[Assistants API Bot in-a-box](https://github.com/Azure-Samples/gen-ai-bot-in-a-box)|This sample provides a step-by-step guide on how to deploy a virtual assistant leveraging the Azure OpenAI Assistants API. It covers the infrastructure deployment, configuration on the AI Studio and Azure Portal, and end-to-end testing examples.| <li>Deploy the necessary infrastructure to support an Azure OpenAI Assistant <br /><li>Configure as Assistant with the required tools.<li>Connect a Bot Framework application to your Assistant to deploy the chat to multiple channels | ## Key Contacts & Contributors If you have any questions or would like to contribute please reach out to: `[email protected]` | Contact | GitHub ID | Email | |--------------|------|-----------| | Alex Morales | @msalemor | `[email protected]` | | Andre Dewes | @andredewes | `[email protected]` | | Andrés Padilla | @AndresPad | `[email protected]` | | Chris Ayers | @codebytes | `[email protected]` | | Eduardo Noriega | @EduardoN | `[email protected]` | | Franklin Guimaraes | @franklinlindemberg | `[email protected]` | | Jean Hayes | @jehayesms | `[email protected]` | | Marco Aurélio Bigélli Cardoso | @MarcoABCardoso | `[email protected]` | | Maria Vrabie | @MariaVrabie | `[email protected]` | | Neeraj Jhaveri | @neerajjhaveri | `[email protected]` | | Thiago Rotta | @rottathiago | `[email protected]` | | Victor Santana | @Welasco | `[email protected]` | | Sabyasachi Samaddar | @ssamadda | `[email protected]` |

AI & Machine Learning ML Frameworks Low-Code & No-Code Dev
600 Github Stars
azure-openai-workshop
Open Source

azure-openai-workshop

# We have moved! Thanks you community for your contribution! We have outgrown ourselves! We decided to move to another location to better reflect our purpose. Here is our new home: https://github.com/Azure/azure-openai-samples

Education & Learning AI Tools
175 Github Stars
mlops-v2
Open Source

mlops-v2

# Azure MLOps (v2) Solution Accelerator ![Header](media/mlopsheader.jpg) Welcome to the MLOps (v2) solution accelerator repository! This project is intended to serve as the starting point for MLOps implementation in Azure. MLOps is a set of repeatable, automated, and collaborative workflows with best practices that empower teams of ML professionals to quickly and easily get their machine learning models deployed into production. You can learn more about MLOps here: - [MLOps with Azure Machine Learning](https://azure.microsoft.com/services/machine-learning/mlops/#features) - [Cloud Adoption Framework Guidance](https://docs.microsoft.com/azure/cloud-adoption-framework/ready/azure-best-practices/ai-machine-learning-mlops) - [How: Machine Learning Operations](https://docs.microsoft.com/azure/machine-learning/concept-model-management-and-deployment) ## Project overview The solution accelerator provides a modular end-to-end approach for MLOps in Azure based on pattern architectures. As each organization is unique, solutions will often need to be customized to fit the organization's needs. The solution accelerator goals are: - Simplicity - Modularity - Repeatability & Security - Collaboration - Enterprise readiness It accomplishes these goals with a template-based approach for end-to-end data science, driving operational efficiency at each stage. You should be able to get up and running with the solution accelerator in a few hours. ## Prerequisites 1. An Azure subscription. If you don't have an Azure subscription, [create a free account](https://azure.microsoft.com/en-us/free/machine-learning/search/?OCID=AIDcmm5edswduu_SEM_822a7351b5b21e0f1ffe102c9ca9e99f:G:s&ef_id=822a7351b5b21e0f1ffe102c9ca9e99f:G:s&msclkid=822a7351b5b21e0f1ffe102c9ca9e99f) before you begin. * **Important** - If you use either a Free/Trial, or similar learning purpose subscriptions like Visual Studio Premium with MSDN, some provisioning tasks might not run as expected due to limitations imposed on 'Usage + quotas' on your subscription. To help you succeed, we have provided specific instructions before provisioning throughout the guide, and you are highly advised to read those instructions carefully 2. For Azure DevOps-based deployments and projects: * [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) with `azure-devops` extension. * [Terraform extension for Azure DevOps](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.custom-terraform-tasks) if you are using Terraform to spin up infrastructure 3. For GitHub-based deployments and projects: * [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) * [GitHub client](https://cli.github.com/) 3. Git bash, WSL, or another shell script editor on your local machine ## Documentation 1. [Solution Accelerator Concepts and Structure](documentation/structure/README.md) - Philosophy and organization 2. [Architectural Patterns](documentation/architecture/README.md) - Supported Machine Learning patterns 3. [Accelerator Deployment Guides](documentation/deployguides/README.md) - How to deploy and use the soluation accelerator with Azure DevOps or GitHub 4. Quickstarts - Precreated project scenarios for demos/POCs. [Azure DevOps ADO Quickstart](https://learn.microsoft.com/en-us/azure/machine-learning/how-to-setup-mlops-azureml?tabs=azure-shell). 5. YouTube Videos: [Deploy MLOps on Azure in Less Than an Hour](https://www.youtube.com/watch?v=5yPDkWCMmtk) and [AI Show](https://www.youtube.com/watch?v=xaW_A0sV6PU) ## Contributing This project welcomes contributions and suggestions. To learn more visit the contributing section, see [CONTRIBUTING.md](CONTRIBUTING.md) for details. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. ## Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Media ML Frameworks
634 Github Stars
intelligent-app-workshop
Open Source

intelligent-app-workshop

# Envisioning Workshop: Build Your Own Custom Copilot [![Open in Visual Studio Code](https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20VS%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc)](https://github.dev/Azure/intelligent-app-workshop) [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC%20BY--SA-222.svg)](https://creativecommons.org/licenses/by-sa/4.0/) Welcome to this envisioning workshop designed to help you build your own custom Copilot using [Microsoft's Copilot stack](https://developer.microsoft.com/en-us/copilot). This workshop aims to rethink user experience, architecture, and app development by leveraging reasoning engines (Foundation models and Language Models) and semantic memory systems. ## Workshop Overview In this comprehensive workshop, you will: - Utilize Azure AI Foundry for reasoning engines, Prompt Flow for LLMOps, AI Search for semantic retrieval systems, and Semantic Kernel for orchestration. - Work with [Miyagi](https://github.com/Azure-Samples/miyagi) codebase during the hands-on experiential workshop - Explore advanced capabilities such as AutoGen and GraphRag ## Objectives This workshop will guide you through the entire lifecycle of app development, including: 1. Identifying user needs 2. Developing a fully functional, production-grade app 3. Deploying your app on Azure with advanced capabilities By the end of this workshop, you will have a deeper understanding of how to leverage Microsoft's tools and technologies to create intelligent applications. <p align="center"><img src="docs/assets/images/basic-arch.png" width=50% /></p> ![wip-azure](docs/assets/images/wip-azure.png) ### Disclaimer This software is provided for demonstration purposes only. It is not intended to be relied upon for any purpose. The creators of this software make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the software or the information, products, services, or related graphics contained in the software for any purpose. Any reliance you place on such information is therefore strictly at your own risk. ### License This software is provided for demonstration purposes only. It is not intended to be relied upon for any purpose. The software is provided “as is” and without any warranties, express or implied. The software is not intended to be used for any commercial purpose. The software is provided solely for demonstration purposes and should not be used for any other purpose. The software is provided without any warranty of any kind, either express or implied, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. The software is provided “as is” and without any warranty of any kind. The user assumes all risk and responsibility for the use of the software.

Education & Learning AI Agents
204 Github Stars
mlops-templates
Open Source

mlops-templates

# Azure MLOps (v2) Solution Accelerator Welcome to the MLOps (v2) solution accelerator repository! This project is intended to serve as the starting point for MLOps implementation in Azure. The main repository from where you can start can be found in this [main README file](https://github.com/Azure/mlops-v2/blob/main/README.md) ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. ## Trademarks This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

AI & Machine Learning Team Whiteboard
143 Github Stars
mlops-project-template
Open Source

mlops-project-template

# Azure MLOps (v2) solution accelerator [Main README file](https://github.com/Azure/mlops-v2/blob/main/README.md)

AI & Machine Learning ML Frameworks
86 Github Stars
aml-deploy
Open Source

aml-deploy

![Integration Test](https://github.com/Azure/aml-deploy/workflows/Integration%20Test/badge.svg?branch=master&event=push) ![Lint and Test](https://github.com/Azure/aml-deploy/workflows/Lint%20and%20Test/badge.svg?branch=master&event=push) # GitHub Action for deploying Machine Learning Models to Azure ## Deprecation notice This Action is deprecated. Instead, consider using the [CLI (v2)](https://docs.microsoft.com/azure/machine-learning/how-to-configure-cli) to manage and interact with Azure Machine Learning endpoints and deployments in GitHub Actions. **Important:** The CLI (v2) is not recommended for production use while in preview. ## Usage The Deploy Machine Learning Models to Azure action will deploy your model on [Azure Machine Learning](https://azure.microsoft.com/en-us/services/machine-learning/) using GitHub Actions. Get started today with a [free Azure account](https://azure.com/free/open-source)! This repository contains GitHub Action for deploying Machine Learning Models to Azure Machine Learning and creates a real-time endpoint on the model to integrate models in other systems. The endpoint can be hosted either on an Azure Container Instance or on an Azure Kubernetes Service. This GitHub Action also allows you to provide a python script that executes tests against the Webservice endpoint after the model deployment has completed successfully. You can enable tests by setting the parameter `test_enabled` to true. In addition to that, you have to provide a python script (default `code/test/test.py`) which includes a function (default ` def main(webservice):`) that describes your tests that you want to execute against the service object. The python script gets the [webservice object](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.webservice(class)?view=azure-ml-py) injected. The action fails, if the test script fails. ## Dependencies on other GitHub Actions * [Checkout](https://github.com/actions/checkout) Checkout your Git repository content into GitHub Actions agent. * [aml-workspace](https://github.com/Azure/aml-workspace) This action requires an Azure Machine Learning workspace to be present. You can either create a new one or re-use an existing one using the action. * [aml-registermodel](https://github.com/Azure/aml-registermodel) Before deploying the model, you need to register the model with Azure Machine Learning. If not already registered, you can use this action and use its output in deploy action. * [aml-compute](https://github.com/Azure/aml-compute) You don't need this if you want to host your endpoint on an ACI instance. But, if you want to host your endpoint on an AKS cluster, you can manage the AKS Cluster via the action. ## Create Azure Machine Learning and deploy an machine learning model using GitHub Actions This action is one in a series of actions that can be used to setup an ML Ops process. **We suggest getting started with one of our template repositories**, which will allow you to create an ML Ops process in less than 5 minutes. 1. **Simple template repository: [ml-template-azure](https://github.com/machine-learning-apps/ml-template-azure)** Go to this template and follow the getting started guide to setup an ML Ops process within minutes and learn how to use the Azure Machine Learning GitHub Actions in combination. This template demonstrates a very simple process for training and deploying machine learning models. 2. **Advanced template repository: [mlops-enterprise-template](https://github.com/Azure-Samples/mlops-enterprise-template)** This template demonstrates how approval processes can be included in the process and how training and deployment workflows can be splitted. It also shows how workflows (e.g. deployment) can be triggered from pull requests. More enhancements will be added to this template in the future to make it more enterprise ready. ### Example workflow ```yaml name: My Workflow on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Check Out Repository id: checkout_repository uses: actions/checkout@v2 # AML Workspace Action - uses: Azure/aml-workspace@v1 id: aml_workspace with: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} # AML Register Model Action - uses: Azure/aml-registermodel@v1 id: aml_registermodel with: azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} run_id: "<your-run-id>" experiment_name: "<your-experiment-name>" # Deploy model in Azure Machine Learning to ACI - name: Deploy model id: aml_deploy uses: Azure/aml-deploy@v1 with: # required inputs azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} model_name: ${{ steps.aml_registermodel.outputs.model_name }} model_version: ${{ steps.aml_registermodel.outputs.model_version }} # optional inputs parameters_file: "deploy.json" ``` ### Inputs | Input | Required | Default | Description | | ----- | -------- | ------- | ----------- | | azure_credentials | x | - | Output of `az ad sp create-for-rbac --name <your-sp-name> --role contributor --scopes /subscriptions/<your-subscriptionId>/resourceGroups/<your-rg> --sdk-auth`. This should be stored in your secrets | | model_name | x | - | Name of the model that will be deployed. You will get it as an output of register model action as in above example workflow. | | model_version | x | - | Version of the model that will be deployed. You will get it as an output of register model action as in above example workflow. | | parameters_file | | `"deploy.json"` | We expect a JSON file in the `.cloud/.azure` folder in root of your repository specifying your model deployment details. If you have want to provide these details in a file other than "deploy.json" you need to provide this input in the action. | #### azure_credentials ( Azure Credentials ) Azure credentials are required to connect to your Azure Machine Learning Workspace. These may have been created for an action you are already using in your repository, if so, you can skip the steps below. Install the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) on your computer or use the Cloud CLI and execute the following command to generate the required credentials: ```sh # Replace {service-principal-name}, {subscription-id} and {resource-group} with your Azure subscription id and resource group name and any name for your service principle az ad sp create-for-rbac --name {service-principal-name} \ --role contributor \ --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} \ --sdk-auth ``` This will generate the following JSON output: ```sh { "clientId": "<GUID>", "clientSecret": "<GUID>", "subscriptionId": "<GUID>", "tenantId": "<GUID>", (...) } ``` Add this JSON output as [a secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets) with the name `AZURE_CREDENTIALS` in your GitHub repository. #### parameters_file (Parameters File) The action tries to load a JSON file in the `.cloud/.azure` folder in your repository, which specifies details for the model deployment to your Azure Machine Learning Workspace. By default, the action expects a file with the name `deploy.json`. If your JSON file has a different name, you can specify it with this parameter. Note that none of these values are required and, in the absence, defaults will be created with a combination of the repo name and branch name. A sample file can be found in this repository in the folder `.cloud/.azure`. There are separate parameters that are used for the ACI deployment, the AKS deployment and some that are common for both deployment options. ##### Common parameters | Parameter | Required | Allowed Values | Default | Description | | ----------------------- | -------- | -------------- | ---------- | ----------- | | name | | str | <REPOSITORY_NAME>-<BRANCH_NAME> | The name to give the deployed service. Must be unique to the workspace, only consist of lowercase letters, numbers, or dashes, start with a letter, and be between 3 and 32 characters long. | | deployment_compute_target | (for AKS deployment) | str | null | Name of the compute target to deploy the webservice to. As Azure Container Instances has no associated ComputeTarget, leave this parameter as null to deploy to Azure Container Instances. | | inference_source_directory | | str | `"code/deploy/"` | The path to the folder that contains all files to create the image. | | inference_entry_script | | str | `"score.py"` | The path to a local file in your repository that contains the code to run for the image and score the data. This path is relative to the specified source directory. The python script has to define an `init` and a `run` function. A sample can be found in the template repositories. | | conda_file | | str | `"environment.yml"` | The path to a local file in your repository containing a conda environment definition to use for the image. This path is relative to the specified source directory. | | extra_docker_file_steps | | str | null | The path to a local file in your repository containing additional Docker steps to run when setting up image. This path is relative to the specified source directory. | | enable_gpu | | bool | false | Indicates whether to enable GPU support in the image. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. | | cuda_version | | str | `"9.1"` if `enable_gpu` is set to true | The Version of CUDA to install for images that need GPU support. The GPU image must be used on Microsoft Azure Services such as Azure Container Instances, Azure Machine Learning Compute, Azure Virtual Machines, and Azure Kubernetes Service. Supported versions are 9.0, 9.1, and 10.0. | | runtime | | str: `"python"` or `"spark-py"` | `"python"` | The runtime to use for the image. | | custom_base_image | | str | null | A custom Docker image to be used as base image. If no base image is given then the base image will be used based off of given runtime parameter. | | model_data_collection_enabled | | bool | false | Whether or not to enable model data collection for this Webservice. | | authentication_enabled | | bool | false for ACI, true for AKS | Whether or not to enable key auth for this Webservice. | | app_insights_enabled | | bool | false | Whether or not to enable Application Insights logging for this Webservice. | | cpu_cores | | float: ]0.0, inf[ | 0.1 | The number of CPU cores to allocate for this Webservice. Can be a decimal. | | memory_gb | | float: ]0.0, inf[ | 0.5 | The amount of memory (in GB) to allocate for this Webservice. Can be a decimal. | | delete_service_after_deployment | | bool | false | Indicates whether the service gets deleted after the deployment completed successfully. | | tags | | dict: {"<your-run-tag-key>": "<your-run-tag-value>", ...} | null | Dictionary of key value tags to give this Webservice. | | properties | | dict: {"<your-run-tag-key>": "<your-run-tag-value>", ...} | | Dictionary of key value properties to give this Webservice. These properties cannot be changed after deployment, however new key value pairs can be added. | | description | | str | null | A description to give this Webservice and image. | | test_enabled | | bool | false | Whether to run tests for this model deployment and the created real-time endpoint. | | test_file_path | | str | `"code/test/test.py"` | Path to the python script in your repository in which you define your own tests that you want to run against the webservice endpoint. The GitHub Action fails, if your script fails. | | test_file_function_name | | str | `"main"` | Name of the function in your python script in your repository in which you define your own tests that you want to run against the webservice endpoint. The function gets the webservice object injected and allows you to run tests against the scoring uri. The GitHub Action fails, if your script fails. | | profiling_enabled | | bool | false | Whether or not to profile this model for an optimal combination of cpu and memory. To use this functionality, you also have to provide a model profile dataset (`profiling_dataset`). If the parameter is not specified, the Action will try to use the sample input dataset that the model was registered with. Please, note that profiling is a long running operation and can take up to 25 minutes depending on the size of the dataset. More details can be found [here](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/deployment/production-deploy-to-aks/production-deploy-to-aks.ipynb). | | profiling_dataset | | str | null | Name of the dataset that should be used for model profiling. | | skip_deployment | | bool | false | Indicates whether the deployment to ACI or AKS should be skipped. This can be used in combination with `create_image` to only create a Docker image that can be used for further deployment. | | create_image | | str: `"docker"`, `"function_blob"`, `"function_http"` or `"function_service_bus_queue"` | null | Indicates whether a Docker image should be created which can be used for further deployment. | Please visit [this website](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.model.inferenceconfig?view=azure-ml-py) and [this website](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.model(class)?view=azure-ml-py#deploy-workspace--name--models--inference-config-none--deployment-config-none--deployment-target-none--overwrite-false-) for more details. ##### ACI specific parameters ACI is the default deployment resource. A sample file for an aci deployment can be found in the `.cloud/.azure` folder. | Parameter | Required | Allowed Values | Default | Description | | ---------------------- | -------- | -------------- | ---------- | ----------- | | location | | str: [supported region](https://azure.microsoft.com/en-us/global-infrastructure/services/?products=container-instances) | workspace location | The Azure region to deploy this Webservice to. | | ssl_enabled | | bool | false | Whether or not to enable SSL for this Webservice. | | ssl_cert_pem_file | | str | null | A file path to a file containing cert information for SSL validation. Must provide all three CName, cert file, and key file to enable SSL validation. | | ssl_key_pem_file | | str | null | A file path to a file containing key information for SSL validation. Must provide all three CName, cert file, and key file to enable SSL validation. | | ssl_cname | | str | null | A CName to use if enabling SSL validation on the cluster. Must provide all three CName, cert file, and key file to enable SSL validation. | | dns_name_label | | str | null | The DNS name label for the scoring endpoint. If not specified a unique DNS name label will be generated for the scoring endpoint. | Please visit [this website](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.webservice.aciwebservice?view=azure-ml-py#deploy-configuration-cpu-cores-none--memory-gb-none--tags-none--properties-none--description-none--location-none--auth-enabled-none--ssl-enabled-none--enable-app-insights-none--ssl-cert-pem-file-none--ssl-key-pem-file-none--ssl-cname-none--dns-name-label-none--primary-key-none--secondary-key-none--collect-model-data-none--cmk-vault-base-url-none--cmk-key-name-none--cmk-key-version-none-) for more details. ##### AKS Deployment For the deployment of the model to AKS, you must configure an AKS resource and specify the name of the AKS cluster with the `deployment_compute_target` parameter. Additional parameters allow you to finetune your deployment on AKS with options like autoscaling and the liveness probe requirements. These will be set to default parameters if not provided. | Parameter | Required | Allowed Values | Default | Description | | ----------------------- | -------- | -------------- | ---------- | ----------- | | gpu_cores | | int: [0, inf[ | 1 | The number of GPU cores to allocate for this Webservice. | | autoscale_enabled | | bool | true if `num_replicas` is null | Whether to enable autoscale for this Webservice. | | autoscale_min_replicas | | int: [1, inf[ | 1 | The minimum number of containers to use when autoscaling this Webservice. | | autoscale_max_replicas | | int: [1, inf[ | 10 | The maximum number of containers to use when autoscaling this Webservice. | | autoscale_refresh_seconds | | int: [1, inf[ | 1 | How often the autoscaler should attempt to scale this Webservice (in seconds). | | autoscale_target_utilization| | int: [1, 100] | 70 | The target utilization (in percent out of 100) the autoscaler should attempt to maintain for this Webservice. | | scoring_timeout_ms | | int: [1, inf[ | 60000 | A timeout in ms to enforce for scoring calls to this Webservice. | | replica_max_concurrent_requests| | int: [1, inf[ | 1 | The number of maximum concurrent requests per replica to allow for this Webservice. **Do not change this setting from the default value of 1 unless instructed by Microsoft Technical Support or a member of Azure Machine Learning team.** | | max_request_wait_time | | int: [0, inf[ | 500 | The maximum amount of time a request will stay in the queue (in milliseconds) before returning a 503 error. | | num_replicas | | int | null | The number of containers to allocate for this Webservice. **No default, if this parameter is not set then the autoscaler is enabled by default.** | | period_seconds | | int: [1, inf[ | 10 | How often (in seconds) to perform the liveness probe. | | initial_delay_seconds | | int: [1, inf[ | 310 | The number of seconds after the container has started before liveness probes are initiated. | | timeout_seconds | | int: [1, inf[ | 1 | The number of seconds after which the liveness probe times out. | | success_threshold | | int: [1, inf[ | 1 | The minimum consecutive successes for the liveness probe to be considered successful after having failed. | | failure_threshold | | int: [1, inf[ | 3 | When a Pod starts and the liveness probe fails, Kubernetes will try failureThreshold times before giving up. | | namespace | | str | null | The Kubernetes namespace in which to deploy this Webservice: up to 63 lowercase alphanumeric ('a'-'z', '0'-'9') and hyphen ('-') characters. The first and last characters cannot be hyphens. | | token_auth_enabled | | bool | false | Whether to enable Token authentication for this Webservice. If this is enabled, users can access this Webservice by fetching an access token using their Azure Active Directory credentials. | Please visit [this website](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.webservice.aks.akswebservice?view=azure-ml-py#deploy-configuration-autoscale-enabled-none--autoscale-min-replicas-none--autoscale-max-replicas-none--autoscale-refresh-seconds-none--autoscale-target-utilization-none--collect-model-data-none--auth-enabled-none--cpu-cores-none--memory-gb-none--enable-app-insights-none--scoring-timeout-ms-none--replica-max-concurrent-requests-none--max-request-wait-time-none--num-replicas-none--primary-key-none--secondary-key-none--tags-none--properties-none--description-none--gpu-cores-none--period-seconds-none--initial-delay-seconds-none--timeout-seconds-none--success-threshold-none--failure-threshold-none--namespace-none--token-auth-enabled-none--compute-target-name-none-) for more details. More Information on autoscaling parameters can be found [here](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.webservice.aks.autoscaler?view=azure-ml-py) and for liveness probe [here](https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.webservice.aks.livenessproberequirements?view=azure-ml-py). ### Outputs | Output | Description | | ------------------- | ------------------------------- | | service_scoring_uri | Scoring URI of the webservice that was created (only provided if `delete_service_after_deployment` is set to False). | | service_swagger_uri | Swagger Uri of the webservice that was created (only provided if `delete_service_after_deployment` is set to False). | | acr_address | The DNS name or IP address (e.g. myacr.azurecr.io) of the Azure Container Registry (ACR) (only provided if `create_image` is not None). | | acr_username | The username for ACR (only provided if `create_image` is not None). | | acr_password | The password for ACR (only provided if `create_image` is not None). | | package_location | Full URI of the docker image (e.g. myacr.azurecr.io/azureml/azureml_*) (only provided if `create_image` is not None). | | profiling_details | Dictionary of details of the model profiling result. This will only be provided, if the model profiling method is used and successfully executed. | ### Environment variables Certain parameters are considered secrets and should therefore be passed as environment variables from your secrets, if you want to use custom values. | Environment variable | Required | Allowed Values | Default | Description | | --------------------------- | -------- | -------------- | ------- | ----------- | | CONTAINER_REGISTRY_ADRESS | | str | null | The DNS name or IP address of the Azure Container Registry (ACR). Required, if you specified a `custom_base_image` that is only available in your ACR. | | CONTAINER_REGISTRY_USERNAME | | str | null | The username for ACR. Required, if you specified a `custom_base_image` that is only available in your ACR. | | CONTAINER_REGISTRY_PASSWORD | | str | null | The password for ACR. Required, if you specified a `custom_base_image` that is only available in your ACR. | | PRIMARY_KEY | | str | null | A primary auth key to use for this Webservice. If not specified, Azure will automatically assign a key. | | SECONDARY_KEY | | str | null | A secondary auth key to use for this Webservice. If not specified, Azure will automatically assign a key. | | CMK_VAULT_BASE_URL | | str | null | Customer managed Key Vault base url. This value is ACI specific. | | CMK_KEY_NAME | | str | null | Customer managed key name. This value is ACI specific. | | CMK_KEY_VERSION | | str | null | Customer managed key version. This value is ACI specific. | ### Other Azure Machine Learning Actions - [aml-workspace](https://github.com/Azure/aml-workspace) - Connects to or creates a new workspace - [aml-compute](https://github.com/Azure/aml-compute) - Connects to or creates a new compute target in Azure Machine Learning - [aml-run](https://github.com/Azure/aml-run) - Submits a ScriptRun, an Estimator or a Pipeline to Azure Machine Learning - [aml-registermodel](https://github.com/Azure/aml-registermodel) - Registers a model to Azure Machine Learning - [aml-deploy](https://github.com/Azure/aml-deploy) - Deploys a model and creates an endpoint for the model # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

Backend as a Service CI / CD
42 Github Stars