# tharunchndrn/campaign_response-end_to_end_mlops_pipeline architecture

> Architecture diagram of the GitHub repository tharunchndrn/campaign_response-end_to_end_mlops_pipeline, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline
- Repository: https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline

## Overview

This repository is a bank-campaign response prediction MLOps project. Its documented workflow validates and splits raw customer data, trains and compares models, tracks experiments and registers the selected model, then serves predictions through a FastAPI endpoint. The graph captures the orchestration and relationships visible in the excerpts, plus major README capabilities. The API’s prediction request/response and model-loading behavior are shown in source; optional container deployment is not mapped as a runtime component.

Main entry points: [`src/models/train.py`](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/models/train.py) (Model comparison), [`main.py`](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/main.py) (Pipeline orchestrator), [`data/raw`](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/tree/main/data/raw) (Bank dataset), [`src/api/app.py`](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/api/app.py) (Prediction API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_rawdata["Bank dataset"]
  node_ingestion["Raw ingestion<br/>[ingestion.py]"]
  node_validation["Data validation<br/>[validation.py]"]
  node_preprocessing["Split and save<br/>[preprocessing.py]"]
  node_processed["Train and test sets"]
end

subgraph group_ml["Model development"]
  node_orchestrator["Pipeline orchestrator<br/>[main.py]"]
  node_features["Feature preparation<br/>[features.py]"]
  node_training["Model comparison<br/>[train.py]"]
  node_modelartifact["Selected model<br/>[best_model.pkl]"]
end

subgraph group_tracking["Experiment management"]
  node_mlflow["MLflow tracking"]
  node_registry["Model registry"]
end

subgraph group_serving["Prediction service"]
  node_api["Prediction API<br/>[app.py]"]
end

node_operator(("Pipeline operator"))
node_customer(("API caller"))
node_prediction["Prediction result"]

node_operator -->|"runs pipeline"| node_orchestrator
node_orchestrator -->|"runs validation"| node_validation
node_orchestrator -->|"runs preprocessing"| node_preprocessing
node_orchestrator -->|"runs training"| node_training
node_rawdata -->|"reads CSV"| node_ingestion
node_rawdata -->|"reads CSV"| node_validation
node_rawdata -->|"reads and splits"| node_preprocessing
node_preprocessing -->|"writes splits"| node_processed
node_processed -->|"provides datasets"| node_training
node_training -->|"uses transforms"| node_features
node_training -->|"saves best model"| node_modelartifact
node_training -->|"logs experiments"| node_mlflow
node_training -->|"registers model"| node_registry
node_mlflow -->|"manages versions"| node_registry
node_customer -->|"submits customer"| node_api
node_api -->|"loads model"| node_modelartifact
node_api -->|"returns prediction"| node_prediction
node_prediction -->|"reports result"| node_customer

click node_rawdata "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/tree/main/data/raw"
click node_ingestion "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/ingestion.py"
click node_validation "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/validation.py"
click node_preprocessing "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/preprocessing.py"
click node_processed "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/tree/main/data/processed"
click node_orchestrator "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/main.py"
click node_features "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/features/features.py"
click node_training "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/models/train.py"
click node_modelartifact "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/models/best_model.pkl"
click node_api "https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/api/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rawdata,node_ingestion,node_validation,node_preprocessing,node_processed toneBlue
class node_orchestrator,node_features,node_training,node_modelartifact toneAmber
class node_mlflow,node_registry,node_customer toneMint
class node_api toneRose
class node_operator,node_prediction toneIndigo
```

## Components

### Data preparation

- [Bank dataset](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/tree/main/data/raw): `data/raw`
- [Raw ingestion](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/ingestion.py): `src/data/ingestion.py`
- [Data validation](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/validation.py): `src/data/validation.py`
- [Split and save](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/data/preprocessing.py): `src/data/preprocessing.py`
- [Train and test sets](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/tree/main/data/processed): `data/processed`

### Model development

- [Pipeline orchestrator](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/main.py): `main.py`
- [Feature preparation](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/features/features.py): `src/features/features.py`
- [Model comparison](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/models/train.py): `src/models/train.py`
- [Selected model](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/models/best_model.pkl): `models/best_model.pkl`

### Experiment management

- **MLflow tracking**
- **Model registry**

### Prediction service

- [Prediction API](https://github.com/tharunchndrn/campaign_response-end_to_end_mlops_pipeline/blob/main/src/api/app.py): `src/api/app.py`

### Other components

- **Pipeline operator**
- **API caller**
- **Prediction result**

## Connections

- Pipeline operator → Pipeline orchestrator: runs pipeline (evidence: `README.md`)
- Pipeline orchestrator → Data validation: runs validation (evidence: `main.py`)
- Pipeline orchestrator → Split and save: runs preprocessing (evidence: `main.py`)
- Pipeline orchestrator → Model comparison: runs training (evidence: `main.py`)
- Bank dataset → Raw ingestion: reads CSV (evidence: `src/data/ingestion.py`)
- Bank dataset → Data validation: reads CSV (evidence: `src/data/validation.py`)
- Bank dataset → Split and save: reads and splits (evidence: `src/data/preprocessing.py`)
- Split and save → Train and test sets: writes splits (evidence: `src/data/preprocessing.py`)
- Train and test sets → Model comparison: provides datasets (evidence: `src/models/train.py`)
- Model comparison → Feature preparation: uses transforms (evidence: `src/models/train.py`)
- Model comparison → Selected model: saves best model (evidence: `src/models/train.py`)
- Model comparison → MLflow tracking: logs experiments (evidence: `src/models/train.py`)
- Model comparison → Model registry: registers model (evidence: `src/models/train.py`)
- MLflow tracking → Model registry: manages versions (evidence: `README.md`)
- API caller → Prediction API: submits customer (evidence: `src/api/app.py`)
- Prediction API → Selected model: loads model (evidence: `src/api/app.py`)
- Prediction API → Prediction result: returns prediction (evidence: `src/api/app.py`)
- Prediction result → API caller: reports result
