Operationalizing Machine Learning models with Azure ML and Power BI
I presented this session at Power Break on March 22, 2021. Topics coevered - limitations of using Python query in Power BI, importance of MLOps, deploying ML models in Azure ML and consuming them in Power BI
Power BI and Azure ML have native integration with each other, which means not only that you can consume the deployed models in Power BI but also use the resources/tools in Azure ML to manage the model lifecycle. There is a misconception that you need Power BI Premium to use Azure ML. In this session I show that's not the case. Below are the topics covered:
-
Limitation of using Python or R in Power BI
- Formula firewall
- Privacy setting of the datasource must be Public
- 30 min query timeout
- Have to use personal gateway
- Cannot use enhanced metadata
- Dependency management
- Not scaleable
- No MLOps
-
Steps to access Azure ML models in Power BI
- Give Azure ML access to Power BI tenant in IAM
- Use scoring script with input/output schema
Topics Covered:
-
Invoking Azure ML models in Power Query in Desktop and using dataflow in service
-
Thoughts on batch-scoring
-
Other considerations:
- Azure ML models can only be called for real-time inference.
- Use ACI for small models and AKS for large models that requore GPU, scaleable compute, low latency, high availability
- Real-time inferencing is expensive! Use batch scoring if real-time is not needed
- Incremental refreshes in Power BI will work with models invoked from Azure ML but watch out for (query) performance
- With Azure Arc, you can use your own Kubernets service! Deploy the model in Azure ML but use your own K8 (AWS, GCP etc.)
- Premium Per User gives you access to Auto ML. If you have access to PPU, it may be worth first experimenting with AutoML before using Azure ML model to save cost. PPU Automl doesn't offer the same level of MLOps capabilities though. I will be presenting a technical deep-dive on using Power BI AutoML on May 26 at Portland Power BI User Group. Sign up on their page if you are interested in the topic.
-
References:
-
https://docs.microsoft.com/en-us/power-bi/connect-data/service-aml-integrate
-
https://pawarbi.github.io/blog/powerbi/r/python/2020/05/15/powerbi-python-r-tips.html
-
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts
-
https://docs.microsoft.com/en-us/azure/machine-learning/tutorial-power-bi-custom-model
-