MLOps: Beginners Guide

Priyansh Neema
4 min readFeb 9, 2022

This blog gives you a quick introduction to MLOps. MLOps stands for Machine Learning Ops. It is basically a combination of Machine Learning, Software Development, and Operations.

MLOps is not about throwing a product and everything is fine..

Agenda

Overview of the Machine learning lifecycle

Challenges with ML Systems

What is MLOps?

Why MLOps?

MLOps Benefits and Costs

What is DevOps?

How MLOps is different from DevOps?

Key Outcomes from MLOp

Conclusion

References

Machine learning lifecycle

Train and test: First, data scientists need to prepare training data. This is often the biggest time commitment in the lifecycle.

Package: ML engineers containerize the model with its environment, which means creating a docker container for the model to run in with all its dependencies.

Validate: At this point, the team evaluates how model performance compares to their business goals. For example, a company might want to optimize for accuracy over speed in some cases.

Repeat steps 1–3: It can take hundreds of training hours to find a satisfactory model. The development team may train many versions of the model by adjusting training data.

Deploy: Finally, they deploy the model in the cloud, on an on-prem server, or at the edge on devices like cameras, and IoT gateways.

Monitor and retrain: Even if a model works well at first, it needs to be continually monitored and accurate.

Source: Microsoft

Challenges with Machine Learning during development

  • Development, training, and deployment environment can be different
  • Tools, libraries, and dependencies can complicate deployment
  • Tracking and analyzing experiments can become difficult to handle
  • Difficult to reproduce experiment as input data changes

Challenges with Machine Learning in production

  • Live data is not equal to training data
  • Feature engineering pipeline must match between training and serving infrastructure
  • Continuous training and champion challenger model deployment
  • Different technology landscapes between development and deployment

What is MLOps?

MLOps in simple terms is DevOps for Machine Learning.
MLOps enables data science, data engineers, ML engineers, and IT teams (Infra engineers) to collaborate and increase the pace at which ML models can be developed, deployed, scaled, monitored, and re-trained.

MLOps: Lifecycle of its production-

Source: NVDIA

Why MLOps?

  1. Keeping track of everything- Data
  2. Build and Deployment Pipeline- This is also called CI/CD and stands for Continous Integration / Continous Delivery.
  3. Monitoring- To keep an eye on your application you need a good monitoring system.

Benefits and Costs

Hence, we will see now pros of MLOps

MLOps Pros:

  • Automatic updating of multiple pipelines, which is terrific as it is not about a simple single code file task
  • ML Models scalability and management — depending on scope, thousands of models can be under control
  • ML Model’s health and governance — simplified management of the model after deployment
  • A useful technique for people, processes, and technology to optimize ML products development

MLOps Costs:

  • Development: more frequent parameters, features, and models manipulation, non-linear experimental approach compared to DevOps
  • Testing: includes data and model validation, model quality testing
  • Production and Monitoring: MLOps needs continuous monitoring and auditing for accuracy
  • Memory monitoring, Model performance monitoring, Infrastructure monitoring.

What is DevOps?

A DevOps is basically a combination of certain automation tool, which help you to speed up the process of delivaring a software to the client.

In DevOps we learn following things-
1. Version Control- Git
2. CI- Jenkins
3. Build tools- Maven, Ant
4. Enrollment setup- Docker — > Swam and Kubernates
5. Confrigration Management tool- Ansible

How MLOps is different from DevOps?

In simple words, the following are the main reasons MLOps is different from DevOps.
> Data/Schema versioning apart from code versioning

> Experimentation tracking (Data Distribution, Model performance, feature importance and more..)

> Monitor continuously for data and model drift

> Continuous re-training of model

> Capture sensitivity of key features to target

Source: Google

Key outcomes of MLOps

Conclusion:

MLOps is a very young field and the best practices are not there yet. I think this is a very interesting field right now and I hope I could clearly show you my approach for doing things. As a result, every company should develop its own set of practices to adjust MLOps to its development and automation of the AI force.

If you have any questions or want to discuss any of the topics further, feel free to connect with me on LinkedIn. Let’s engage, learn from each other, and grow together.

Thank you for taking the time to read my article!
I hope you found it helpful and insightful. Your comments and claps mean a lot to me and encourage me to continue creating valuable content.

References:

https://cloud.google.com/solutions/machine-learning/mlops-continuous-delivery-and-automation-pipelines-in-machine-learning

https://blogs.nvidia.com/blog/2020/09/03/what-is-mlops/

https://azure.microsoft.com/mediahandler/files/resourcefiles/mlops-infographic/MLOps%20Infographic.pdf

https://mlops.community/

--

--

Priyansh Neema

Hello all!! I am currently pursuing B.Tech computer science. I'm open minded, helpful, and enthusiastic learner.