Aahan Singh
Aahan Singh's Blog

Aahan Singh's Blog

Applied MLOps

A Gentle Introduction

Aahan Singh
·Jul 19, 2021·

4 min read

Applied MLOps

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

Table of contents

  • Now, what the hell is MLOps?
  • What will this series of articles be about?

As of late, there has been a lot of talk about this emerging field called Machine Learning Operations aka MLOps. This field is evolving at the speed of light, encompasses multiple fields of expertise, and can be hard, to begin with.

That’s where this series comes in. Here, I will try my best to simplify MLOps. You will learn what MLOps is, how to use MLOps in your processes, and hopefully, become a more complete machine learning developer.

Now, what the hell is MLOps?

Machine learning is hard. Right from getting the data, cleaning it, training a model and, deploying it, the whole process is complex.

Additionally, there is a lot of variability in the processes between different companies as well as the developers within the same company. In most places, there isn’t any standardized way to develop models (although companies are starting to standardize their ML development processes now). For instance, the typical way of developing an ML model involves heavy usage of Jupyter Notebooks. A good number of data scientists use Jupyter Notebooks to develop their models and perform their experiments. With time, this library of notebooks grows and, more often than not, becomes difficult to manage. It’s also common to see the lack of a proper naming convention for these notebooks. Knowing which notebook contains what becomes a guessing game. You might have seen a bunch of memes like these,

Indeed this is a real problem.

To add to the complexity of ML development, every ML model depends on 2 things: data (that the model would be trained on) and code (of the ML pipeline itself). Between the two of these, the most mercurial element is the data. And since the data is constantly changing, so is the model. It becomes crucial to track changes in both the data as well as the models that use the data.

However, many components of the ML pipeline remain unchanged over time and can be reused when training different models. For example, consider an ML engineer who is handling a recommendation engine for an eCommerce website. After the model has been deployed, new data about the users’ buying patterns would be collected, but the format of the data will remain the same. As a data-hungry engineer, the ML engineer would want to update the prediction model. Now, the engineer does not need to start from scratch! Components like data preprocessing can be reused (assuming the type or format of data is unchanged).

So how does one standardize the process for developing machine learning models?

The answer is MLOps.

MLOps aims to automate the machine learning lifecycle.

MLOps combines the best practices from DevOps and software engineering, to make the process of development to deployment of machine learning based products easier, streamlined, and faster.

Think of it as version control and CI/CD applied to ML. That means we track and assign versions to everything, from data to individual experiments, to the models themselves and everything in between, along with automating the experimentation, deployment, and monitoring of the models.

Ever wonder how companies like OpenAI and DeepMind carry out such large-scale experiments (1000s of different models trained on extremely huge datasets)?

No way one person or even a team of data scientists & engineers can carry out such large-scale experiments without a systematic approach. Operations, like carrying out different sets of experiments by leveraging the underlying infrastructure and comparing them to extract the best model, can be automated via MLOps.

What will this series of articles be about?

The best way to learn MLOps, as is the case with almost everything in life, is by practice. Using a hands-on approach, we will containerize our code using docker, deploy different MLOps tools for our model using Kubernetes, deploy our model on both our local machine and a Kubernetes cluster, and much more.

But m8 I don’t know any of this, how will I understand what you’re saying?

I will try to make everything as beginner-friendly as possible. You don’t need to know anything about Docker or Kubernetes to get started. I will try to give a 5000ft view of these tools but you will have to dive deeper to get a better understanding. For that, I will provide links to other resources that do a better job of explaining these concepts than I ever could.

MLOps Resources:

  1. Introducing MLOps by the Dataiku team: A great book that explains the basics of MLOps.

  2. MLOps Community: A cool community of people who are into MLOps & want to learn MLOps.

  3. Awesome MLOps Github repo: A great list of resources for all things MLOps.


If you enjoyed reading this article or if it helped you in any way, a 👏 is appreciated. Do share this article with others who may be interested in the topic too.

Stay in touch with me on Linkedin and Twitter for regular updates. Follow me on GitHub.

 
Share this