💡 Notes - Deployment of Machine Learning Models
01. Course Content
- Deployment Overview
- Model deployment and why it matters
- Research and production environments
- Machine Learning System Architecture
- Machine Learning system architecture
- architecture components
- challenges and principles of creating a suitable system architecture
- different architecture approaches
- Building reproducible pipelines
- challenges and how to mitigate them
- Machine Learning system architecture
- Research Environment
- Machine Learning pipeline
- data gathering
- feature engineering and selection
- model building and assessment
- Starting point for deploying a machine learning model
- Machine Learning pipeline
- Production Code
- Transform the notebooks to production code
- code and project structure
- OOP
- logging, error handling and unit tests
- use of environments and testing tools
- production tools
- Transform the notebooks to production code
- Serving Model via REST API
- Create an API - FastAPI
- Send data and obtain predictions
- Schema validation
- Exception handling
- Packaging a Model
- Create a package with the model
- Deploy to private repository
- Tooling
- CI/CD
- Introduction to CI/CD
- CircleCI
- Publish model to a private repository
- Test the CI pipeline
- Deploy to Platform as a Service (Paas)
- What is PaaS
- Tooling
- Deploying with CI/CD
- Running Apps in Containers
- Intro to containers and Docker
- Installing Docker
- Creating an API App Dockerfile
- Build and run a Docker container
- Release to PaaS utilising Docker
- Assessing Reproducibility
- Compare the results between production and research models
- Assess deployed model performance
02. Overview of Model Deployment
- Deployment of Machine Learning Models
- What is Machine learning deployment?
- the deployment of machine learning models is the process for making models available in production environments, where they can provide predictions to other software systems
- one of the last stages in the Machine Learning lifecycle
- potentially the most challenging stage
- Why is model deployment challenging?
- challenges of traditional software: reliability, reusability, maintainability, flexibility
- additional challenges specific to Machine Learning: reproducibility
- needs coordination of data scientists, IT teams, software developers and business professionals: ensure model works reliably, ensure model delivers the intended results
- potential discrepancy between programming language in which the model is developed and the production system language - re-coding the model extends the project timeline and risks lack of reproducibility
- Why is model deployment important?
- to start using a Machine Learning model, it needs to be effectively deployed into production, so that they can provide predictions to other software systems
- to maximize the value of Machine Learning models, we need to be able to reliably extract the predictions and share them with other systems
- What is Machine learning deployment?