Automation

Developing Machine Learning Models for Production

Sinan Ozdemir

Data Scientist, Entrepreneur, and Author

Introduction to ML automation

  • Automation ensures reliability & efficiency of ML pipelines
  • Reduces risk of human error
  • Streamlines development & deployment process
  • The four main MLOps principles are:
    • Continuous Integration (CI)
    • Continuous Deployment (CD)
    • Continuous Training (CT)
    • Continuous Monitoring (CM)
Developing Machine Learning Models for Production

Four principles of automation

Continuous Integration (CI) Integrating code changes into a shared repository regularly coding

Continuous Delivery (CD) Automatically building, testing, and deploying code changes package

Continuous Training (CT) Continuously training & updating the model with new data

brain

Continuous Monitoring (CM) Monitoring model performance and accuracy on an ongoing basis monitor

Developing Machine Learning Models for Production

Continuous integration and delivery

Continuous Integration (CI)

  • Ensures code always in working state
  • Reduces risk of human error
  • Catches issues early

Continuous Delivery (CD)

  • Quick & consistent model deployment
  • Reduces time to bring models to production
  • Reduces risk of human error

CI/CD tools: Git, AWS CodePipeline, Jenkins, Travis CI

jenkins

Developing Machine Learning Models for Production

Continuous training and monitoring

Continuous Training (CT)

  • Ensures model accuracy & up-to-date
  • Reduces risk of model decay
  • Reduces time to re-train

Continuous Monitoring (CM)

  • Reduces risk of model decay
  • Improves overall accuracy
  • Access to consistent & reliable ML metrics
  • Identifies issues early

monitor

Developing Machine Learning Models for Production

Example of ML automation at scale

  1. CI: The code for the model is committed to Git.

  2. CD: The committed code is built and tested using a CI/CD tool like Jenkins. If they pass, we deploy.

    • The model is serialized.
    • Dependencies are set using Docker.
    • The Docker image is deployed.
  3. CM: Model performance is continuously monitored.

    • Monitoring informs decisions about the model.
    • CM tools include Prometheus & Grafana
  4. CT: The model is trained on new data.

  5. New code is written / models are updated ... back to step 1

Developing Machine Learning Models for Production

Let's practice!

Developing Machine Learning Models for Production

Preparing Video For Download...