385. The 4 Layers Of MLOps

▮ Hierarchy Of Needs

Every ML system works efficiently only when the basic foundation exists.
Here are the 4 layers required to construct true ML Automation(MLOps).

The ML engineering hierarchy of needs is shown in the Figure below.

Fig.1 – Hierarchy

From the most basic needs,
1. DevOps
2. Data Automation
3. Platform Automation
4. MLOps

Let’s take a look at each layer.

Reference: Practical MLOps

▮ 1. DevOps

DevOps is a set of management practices to increase the organization’s velocity in releasing software with high quality. Here are the most 2 famous examples to implement this practice.

Continuous Integration(CI)

CI is about continuously improving the software based on automated testing results.

Continuous Delivery(CD)

CD is a process of deploying code to production continuously and automatically.

▮ 2. Data Automation

The next layer we need to consider is automating the flow of data. An organization without an automated flow of data cannot reliably do MLOps. This is where job titles such as data engineers will be spending most of their time working.

Many organizations use a centralized data lake, such as Amazon S3, for all activities related to data engineering. This is because a data lake allows data processing without a need to move it around, therefore being helpful to build automation.

Fig.2 – DataOps using a Data Lake

▮ 3. Platform Automation

Once data automation is complete, our next step is to create a platform to build machine-learning solutions.

The figure below is an example of a platform that solves repeatability, scale, and operationalization using Amazon S3 as a data lake, and AWS Sagemaker as the platform.

Fig.3 – Sagemaker Architecture Example: [Source](https://www.oreilly.com/library/view/practical-mlops/9781098103002/ch01.html)

Developing these infrastructure steps without automation would become easily complicated. It is crucial to be able to automate these infrastructures.

▮ 4. MLOps

After all the previous layers are complete, MLOps is finally possible.
MLOPS is about creating reproducible models with robust model packaging, validation, and deployment.

Implementing such practice includes the following.

  1. Create and retrain models with reusable ML pipelines
  2. Continuous delivery of ML models
  3. Monitor MLOPs Pipeline
  4. Observe model performance

I’ve created a blog post on the development process for ML systems which is the same process for MLOps as well. Please go check it out if you are interested.
ML System Development Process