MLOps? What’s that?

MLOps is everything that DevOps is, plus the part where it takes care of your ML model training along with dataset and model management.

Image for post

Not more than a couple of weeks ago, I had just zeroed in on and trained a model required for a project which I had been working on. The model worked as required and expected, and it was time to deploy the application which made use of the model. I looked towards Azure DevOps as usual, to version control my application’s source code as well as package and deploy it. But like all the other times, I wondered,

What would I do when the client comes up with new data and retraining is required? Do I manually retrain the model and tediously maintain its versions along with datasets’? What if I automated the model training and versioning process and added that to my current DevOps process?

Acting on my musings this time around, I started looking for a solution. And with me already working on Azure platform, I soon stumbled upon their MLOps solution.

What did I want to do?

Set up a pipeline which:

  • Prepared my data for model training
  • Saved the prepared data as a versioned dataset
  • Trained the model
  • Maintained the model’s version

How did I do it?

I used the Azure Machine Learning SDK for Python and wrote a script which created an MLOps pipeline. The pipeline took care of everything that I wanted from this solution and could be triggered via UI on Azure’s ML web portal, through a REST endpoint etc.

The Script Recipe

The script which creates the MLOps pipeline would loosely consist of the following:

Creating Workspace Object

I created a workspace object which is used to access all the resources related to a workspace in your Azure subscription. It required information about your workspace and subscription as well as credentials to grant the acces

#mlops #machine-learning #azure-machine-learning #azure-ml-studio #devops

Azure MLOps: Doing DevOps one better
4.10 GEEK