Deployment deep learning system with some models with MLaaS - azure-machine-learning-service

I read some articles with deployment examples and they were about deploying one model but not a whole deep learning system.
If I want to deploy my project including launch of multiple deep models built with different frameworks (Pytorch, tensorflow) then what's good option for that:
build Docker image with whole project and deploy it with ml
service (azure, aws lambda etc);
or deploy every single model with
chosen MLaaS and and elsewhere deploy the logic that makes requests
to the above models;
I would appreciate any reference/link on the subject.
Thanx.

We have public open source release of Many Models solution accelerator. The accelerator is now available on GitHub and open to everyone: Many Models: https://aka.ms/many-models.
• Check out a blog on Many Models from MTC AI Architect Sam here
Check this document using designer: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-model-designer? Basically you can register a trained model in Designer bring it out with SDK/CLI to deploy it.
One approach with current integration between Azure ML and Azure DevOps is to setup a release pipeline in Azure DevOps which is triggered by the model registration in your Dev workspace model registry which them deploys to your Prod workspace.
There is guidance and examples in this repo
https://github.com/Microsoft/MLOpsPython
And more general guidance for MLops at http://aka.ms/mlops
This also allows for putting integration tests into your release process or other steps like approval processes if needed using DevOps functionality.

Related

Can Azure Logic App pull repository from bitbucket?

Is it possible to pull / clone bitbucket repository within Azure Logic Apps?
I am curious if it is possible to set up some backend tests within Azure Logic Apps. So to pull repo with tests first and then execute them within CLI. I see that there is bitbucket connector in Logic Apps but there is no option to pull the repo. Or should I check some custom connector to run commands from hand like "git clone" etc. - if yes which one?
Azure Logic Apps is a cloud platform where you can create and run automated workflows with little to no code. By using the visual designer and selecting from prebuilt operations, you can quickly build a workflow that integrates and manages your apps, data, services, and systems.
From: What is Azure Logic Apps?
The key concepts here are "little to no code" and "prebuilt operations". Building your code with a CLI and running its tests is not something Logic Apps is targeting. It would also make executing Logic Apps a LOT more complex on the Azure end, since it would mean installing any and all frameworks, tools, etc. that are needed for building the code/running the tests.
If you look at Bitbucket actions that are supported, you can kind of make out that they're all API calls.
What you're looking for is available for free with GitHub workflows
A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered manually, or at a defined schedule.
or Azure Pipelines.
Azure Pipelines automatically builds and tests code projects. It supports all major languages and project types and combines continuous integration, continuous delivery, and continuous testing to build, test, and deliver your code to any destination.
Potentially interesting read: Build Bitbucket Cloud repositories.

Download and use Azure AutoML model on local machine?

I've used Azure AutoML to build and train a classification model. However, instead of deploying the model to a web service or real-time endpoint, I'd like to be able to download the model and run it on my local machine.
I've attempted to follow https://learn.microsoft.com/en-us/azure/machine-learning/v1/how-to-deploy-local, however it's quite vague and I'm a beginner to using ML models so got stuck quite quickly.
In Azure ML SDK v1 you can download the model and deploy locally. Here is the document and the sample notebook to deploy locally .
You can download the model:
From the portal, by selecting the Models tab, selecting the desired model, and on the Details page, selecting Download.
From the command line, by using az ml model download.
By using the Python SDK Model.download() method.

Update Azure ML realtime endpoint

I'm generating a machine learning modell using Azure Auto ML. Is there a way to update my published real-time endpoint without deleting it first?
Thanks in advance.
One approach with current integration between Azure ML and Azure DevOps is to setup a release pipeline in Azure DevOps which is triggered by the model registration in your Dev workspace model registry.
There is guidance and examples in this repo
https://github.com/Microsoft/MLOpsPython
And more general guidance for MLops at http://aka.ms/mlops
Please follow the below for retraining.
https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/ai/mlops-python#retraining-pipeline

Machine learning in Azure: How do I publish a pipeline to the workspace once I've already built it in Python using the SDK?

I don't know where else to ask this question so would appreciate any help or feedback. I've been reading the SDK documentation for azure machine learning service (in particular azureml.core). There's a class called Pipeline that has methdods validate() and publish(). Here are the docs for this:
https://learn.microsoft.com/en-us/python/api/azureml-pipeline-core/azureml.pipeline.core.pipeline.pipeline?view=azure-ml-py
When I call validate(), everything validates and I call publish but it seems to only create an API endpoint in the workspace, it doesn't register my pipeline under Pipelines and there's obviously nothing in the designer.
My question: I want to publish my pipeline so I just have to launch from the workspace with one click. I've built it already using the SDK (Python code). I don't want to work with an API. Is there any way to do this or would I have to rebuild the entire pipeline using the designer (drag and drop)?
Totally empathize with your confusion. Our team has been working with Azure ML pipelines for quite some time but PublishedPipelines still confused me initially because:
what the SDK calls a PublishedPipeline is called as a Pipeline Endpoint in the Studio UI, and
it is semi-related to Dataset and Model's .register() method, but fundamentally different.
TL;DR: all Pipeline.publish() does is create an endpoint that you can use to:
schedule and version Pipelines, and
re-run the pipeline from other services via a REST API call (e.g. via Azure Data Factory).
You can see PublishedPipelines in the Studio UI in two places:
Pipelines page :: Pipeline Endpoints tab
Endpoints page :: Pipeline Endpoints tab

Visual Studio Online, multiple Cloud projects, Continuous Integration

I have a Visual Studio 2013 solution with 3 cloud service projects (1 Web Role, 2 Worker Roles) and a set of nUnit tests hosted in Visual Studio Online.
Through Azure portal, I've setup a continuous integration build that builds and deploys my solution on checkin. Azure, however asked me for a single Cloud Service to deploy solution into (although my project contains 3 of them) and obviously, the build only deploys one of the cloud projects (presumably the first one it finds). How can I make it deploy all three?
I'd rather not create three different builds.
From my experience, you cannot deploy all of your azure projects within your solution to azure at the same time using the VSO CI builds. If you look at your CI build definition under process you'll see that you can only specify one cloud service name to deploy to. We ended up having to create one solution, with one azure project, and one CI build per cloud service. We use the staging environments as a temporary deployment destination until all of our services are built/deployed, then swap them all at the same time to achieve a somewhat seamless/instant update.
Hope this helps.
I was able to get this to work with the new VSO VBuild Next System in TFS 2015.
You are able to build a specific *.ccproj cloud service project and from there use a specific task to publish to azure.
This allows me to have multiple cloud services and multiple web roles in the same solution.
You should also be able to build multiple cloud service projects and setup multiple publish tasks, all from the same build definition.
From MS...
We've built a brand new scriptable build system that's web-based and
cross-platform. We believe all new and most existing customers should
use it instead of the XAML build system.
More info:
https://msdn.microsoft.com/Library/vs/alm/Build/overview
Here is a view of my build tasks..

Resources