Azure Functions are code triggered events that scale well owing to their serverless capabilities. The triggering mechanisms are diverse — time based (CRON functions), http, storage triggers (blob, queue) etc. Functions are also unique in that they can be coded in a variety of languages like C#, Python, Javascript etc. In this article, I will be demonstrating a simple ML python script that is triggered using Azure functions using VS code. You can check my git repo here.

Requirements:

  • VS Code with Azure extensions loaded
  • Azure subscription (free credits available)
  • Azure function CLI installed. Please follow https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=windows%2Ccsharp%2Cbash
  • A pickled ML model. Here I have picked a simple model that uses a regression algorithm to predict the price of a piece of real estate based on factors like age of the building, the distance from the city, the number of stores around the place, latitude and longitude. The focus has been on the implementation of the model in Azure functions and not the accuracy of the model itself.

#azure-functions #machine-learning #python

Deploy Python Codes with Azure Functions
2.00 GEEK