Introduction to MLOps

Andrei Paleyes

AI4ER

Cambridge

November 2023

Have you ever

  • trained a ML model?
  • fixed an issue in a model?
  • gave the model you worked on to anyone else?
  • created an app/website/service around a model?
  • updated an existing model with a new dataset?

Have you ever

  • trained a ML model?
  • fixed an issue in a model?
  • gave the model you worked on to anyone else?
  • created an app/website/service around a model?
  • updated an existing model with a new dataset?
Source: https://dlab.berkeley.edu/news/what-mlops-introduction-world-machine-learning-operations

What is MLOps?

“MLOps is a collection of processes, practices, technologies and tools to deploy and maintain machine learning models in production reliably and efficiently.”

Cassava Leaf Disease Classification

Kudos!

Ernest Mwebaze

Train a model

Source: https://vitalflux.com/different-types-of-cnn-architectures-explained-examples/
“Effective big data mining at scale doesn't begin or end with what academics would consider data mining.”
Scaling Big Data Mining Infrastructure: The Twitter Experience
J Lin, D Ryaboy; ACM SIGKDD Explorations Newsletter, 2013

Data collection

Data enginering

Not a leaf!
Banana is not cassava!
Leaf soup is not leaf!

Train a model (2)

Source: https://vitalflux.com/different-types-of-cnn-architectures-explained-examples/

Model evaluation and analysis

“An interesting finding is that increasing the performance of a model does not necessarily translate into a gain in [business] value.”
150 successful machine learning models: 6 lessons learned at Booking.com
Bernardi et al., KDD'19

Train a model (3)

Source: https://vitalflux.com/different-types-of-cnn-architectures-explained-examples/

Where to run the model

Source: https://unsplash.com/images/nature/cloud
Source: https://www.pixelsquid.com/png/toy-phone-pink-2648062784222270660

Mobile app

Source: https://blog.starcompliance.com/four-ways-to-know-you-need-a-mobile-compliance-app

Deployment

Source: https://medium.com/@suneet.bhopal/data-preprocessing-using-python-1bfee9268fb3

And we are done!

Or are we?

Monitoring

Source: https://www.redbubble.com/i/art-board-print/Task-failed-successfully-by-dhyman/42512359.5E8EA

Monitoring

Source: https://www.metricfire.com/blog/introduction-to-performance-monitoring-metrics/

Train a model (4)

Source: https://vitalflux.com/different-types-of-cnn-architectures-explained-examples/

And we are done!

For real this time

Kind of done, anyway

Tools!

Source: https://en.wiktionary.org/wiki/scissor
Source: https://snyk.io/learn/what-is-ci-cd-pipeline-and-tools-explained/

Tools landscape 2012

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

Tools landscape 2023

MLOps maturity levels

  • 0 - No automation
  • 1 - DevOps but no MLOps
  • 2 - automated training
  • 3 - automated deployment
  • 4 - fully automated MLOps

Advanced topics

  • Multiple models, model registry
  • Data and model versioning
  • Experiment tracking
  • Live experiments e.g A/B testing
  • ...

Resources