# Monolithic MLOps Pipeline

> All stages of the ML lifecycle run in a single orchestrated pipeline managed by tools like Airflow or Prefect.

- **Category**: Machine Learning
- **Subcategory**: MLOps
- **Canonical URL**: https://designpattern.fyi/machine_learning/monolithic_mlops_pipeline/

---

## Description
**Context**: The monolithic pipeline is the simplest architecture, suitable for small teams running a few models. Data ingestion, feature engineering, training, evaluation, and deployment are steps in one DAG.


## Use Cases
Small teams running 5-10 models where simplicity and low operational overhead are priorities.



## Implementation Example

```python
# Monolithic Pipeline
with DAG("ml_pipeline") as dag:
    ingest = ingest_data()
    features = feature_engineering(ingest)
    train = training(features)
```



## Trade-offs


### Advantages

- - Simple to understand and debug

- - Single codebase

- - Easy to set up

- - Low operational overhead




### Considerations & Drawbacks

- - Does not scale beyond 5-10 models

- - Teams step on each other

- - Single point of failure

- - Hard to reuse components







---
**Reference**: [Original Source](https://kindatechnical.com/mlops-guide/mlops-architecture-patterns-and-reference-designs.html)

