MLOpsPython

A real demo of Deep Learning project with preprocessing from development to production using code, ops and Machine Learning best practices. Production is a real time REST API.

Competences

  • Code / Debug
  • UnitTest, Test Driven Development principles
  • Clean Code, Inversion Of Dependence, Functional Programing
  • Build & Publish packages
  • Git
  • Linux Bash
  • REST API
  • Docker
  • Kubernetes

Tools

Introduction

The name of our company: MLOps

Today a team of indexers receive 10,000 PDF files a day containing either cats or dogs or something else. They must manually open each PDF to classify them.

We are going to automate this process. We will use a machine learning model to classify PDF files and expose it as a REST API. It will work in real time. project_workflow.png

What is MLOps?

MLOps is involved in the entire life cycle of an AI project. This is all that will allow your AI project to go into production and then keep your project in production.

No MLOps practices, no production.

MLOps_is_more_about_human_culture.PNG

Delivery of a MLOps project

The deliverable of a project is not the AI model, it's how the AI model is generated.

The model must be reproducible.

The deliverable is:

  • Versioned data
  • Versioned code

Project structure

We will use the following project structure. We will use mono-repository git in order to work together. It will help to retrain a model and deploy it in production from one manual action maximum.

code_organization.PNG

ML Libraries/Technologies choice

Technologies choices have a huge impact on your development cost. You cannot use a hundred of libraries and expect to have a good result in a short time. It will be a nightmare to maintain and to debug.

Enterprises use Technologies RADAR to manage and maintain their technologies choice : https://github.com/axa-group/radar

ml_libraries_choices.PNG

Step 0 : Setup

step_0_setup.md

Step 1: Extract images from PDF files

step_1_extraction.md

Step 2: Label images

step_2_label.md

Step 3: Train AI model

step_3_train.md

Step 4: Share common code as libraries for production

step_4_share.md

Step 5: REST API

step_5_rest_api.md

Step 6: Deploy

step_6_deploy.md

Step 7: Integration testing

step_7_integration_testing.md