# waddi3/customer-churn-mlops architecture

> Architecture diagram of the GitHub repository waddi3/customer-churn-mlops, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/waddi3/customer-churn-mlops
- Repository: https://github.com/waddi3/customer-churn-mlops

## Overview

This repository is a Telco customer-churn classification pipeline. The user starts it with `run_pipeline.py`; it loads the raw workbook, explores and preprocesses the data, engineers features, trains and selects a model, then evaluates it. The pipeline also saves versioned datasets and model artifacts and tracks training and evaluation in MLflow. The graph includes configuration and logging as internal support layers. README capabilities are retained; links for stages not shown in sampled code are omitted rather than inferred.

Main entry points: [`run_pipeline.py`](https://github.com/waddi3/customer-churn-mlops/blob/main/run_pipeline.py) (Pipeline Runner), [`src/train.py`](https://github.com/waddi3/customer-churn-mlops/blob/main/src/train.py) (Model Training), [`src/logger.py`](https://github.com/waddi3/customer-churn-mlops/blob/main/src/logger.py) (Application Logging), [`src/data_loader.py`](https://github.com/waddi3/customer-churn-mlops/blob/main/src/data_loader.py) (Data Loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Pipeline Workflow"]
  node_runner["Pipeline Runner<br/>[run_pipeline.py]"]
end

subgraph group_data["Data Preparation"]
  node_raw["Raw Workbook"]
  node_loader["Data Loading<br/>[data_loader.py]"]
  node_eda["Exploratory Analysis<br/>[eda.py]"]
  node_preprocess["Preprocessing<br/>[preprocessing.py]"]
  node_cleaned["Cleaned Dataset<br/>[cleaned_data.csv]"]
  node_features["Feature Engineering"]
  node_processed["Processed Dataset<br/>[processed_data.csv]"]
end

subgraph group_model["Modeling And Evaluation"]
  node_trainer["Model Training<br/>[train.py]"]
  node_savedmodel["Saved Model Artifacts"]
  node_evaluator["Model Evaluation<br/>[evaluate.py]"]
end

subgraph group_ops["Tracking And Support"]
  node_mlflowsetup["MLflow Setup<br/>[mlflow_utils.py]"]
  node_tracking[("MLflow Tracking")]
  node_config["Path Configuration<br/>[config.py]"]
  node_logger["Application Logging<br/>[logger.py]"]
end

node_user(("Pipeline User"))

node_user -->|"starts"| node_runner
node_runner -->|"configures"| node_mlflowsetup
node_runner -->|"loads data"| node_loader
node_loader -->|"reads"| node_raw
node_runner -->|"runs analysis"| node_eda
node_runner -->|"preprocesses"| node_preprocess
node_preprocess -->|"writes"| node_cleaned
node_runner -->|"engineers features"| node_features
node_features -->|"writes"| node_processed
node_runner -->|"trains models"| node_trainer
node_trainer -->|"saves best model"| node_savedmodel
node_trainer -->|"logs runs"| node_tracking
node_runner -->|"evaluates model"| node_evaluator
node_evaluator -->|"logs artifacts"| node_tracking
node_mlflowsetup -->|"configures store"| node_tracking
node_loader -->|"uses data path"| node_config
node_preprocess -->|"uses output path"| node_config
node_features -->|"uses output paths"| node_config
node_trainer -->|"uses model path"| node_config
node_loader -->|"logs progress"| node_logger
node_preprocess -->|"logs progress"| node_logger
node_features -->|"logs progress"| node_logger
node_trainer -->|"logs progress"| node_logger
node_evaluator -->|"logs metrics"| node_logger

click node_runner "https://github.com/waddi3/customer-churn-mlops/blob/main/run_pipeline.py"
click node_raw "https://github.com/waddi3/customer-churn-mlops/blob/main/data/v1/Telco_customer_churn.xlsx"
click node_loader "https://github.com/waddi3/customer-churn-mlops/blob/main/src/data_loader.py"
click node_eda "https://github.com/waddi3/customer-churn-mlops/blob/main/src/eda.py"
click node_preprocess "https://github.com/waddi3/customer-churn-mlops/blob/main/src/preprocessing.py"
click node_cleaned "https://github.com/waddi3/customer-churn-mlops/blob/main/data/v2/cleaned_data.csv"
click node_features "https://github.com/waddi3/customer-churn-mlops/blob/main/src/feature_engineering.py"
click node_processed "https://github.com/waddi3/customer-churn-mlops/blob/main/data/v3/processed_data.csv"
click node_trainer "https://github.com/waddi3/customer-churn-mlops/blob/main/src/train.py"
click node_savedmodel "https://github.com/waddi3/customer-churn-mlops/tree/main/models"
click node_evaluator "https://github.com/waddi3/customer-churn-mlops/blob/main/src/evaluate.py"
click node_mlflowsetup "https://github.com/waddi3/customer-churn-mlops/blob/main/src/mlflow_utils.py"
click node_config "https://github.com/waddi3/customer-churn-mlops/blob/main/src/config.py"
click node_logger "https://github.com/waddi3/customer-churn-mlops/blob/main/src/logger.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_runner,node_user toneBlue
class node_raw,node_loader,node_eda,node_preprocess,node_cleaned,node_features,node_processed toneAmber
class node_trainer,node_savedmodel,node_evaluator toneMint
class node_mlflowsetup,node_tracking,node_config,node_logger toneRose
```

## Components

### Pipeline Workflow

- [Pipeline Runner](https://github.com/waddi3/customer-churn-mlops/blob/main/run_pipeline.py): `run_pipeline.py`

### Data Preparation

- [Raw Workbook](https://github.com/waddi3/customer-churn-mlops/blob/main/data/v1/Telco_customer_churn.xlsx): `data/v1/Telco_customer_churn.xlsx`
- [Data Loading](https://github.com/waddi3/customer-churn-mlops/blob/main/src/data_loader.py): `src/data_loader.py`
- [Exploratory Analysis](https://github.com/waddi3/customer-churn-mlops/blob/main/src/eda.py): `src/eda.py`
- [Preprocessing](https://github.com/waddi3/customer-churn-mlops/blob/main/src/preprocessing.py): `src/preprocessing.py`
- [Cleaned Dataset](https://github.com/waddi3/customer-churn-mlops/blob/main/data/v2/cleaned_data.csv): `data/v2/cleaned_data.csv`
- [Feature Engineering](https://github.com/waddi3/customer-churn-mlops/blob/main/src/feature_engineering.py): `src/feature_engineering.py`
- [Processed Dataset](https://github.com/waddi3/customer-churn-mlops/blob/main/data/v3/processed_data.csv): `data/v3/processed_data.csv`

### Modeling And Evaluation

- [Model Training](https://github.com/waddi3/customer-churn-mlops/blob/main/src/train.py): `src/train.py`
- [Saved Model Artifacts](https://github.com/waddi3/customer-churn-mlops/tree/main/models): `models`
- [Model Evaluation](https://github.com/waddi3/customer-churn-mlops/blob/main/src/evaluate.py): `src/evaluate.py`

### Tracking And Support

- [MLflow Setup](https://github.com/waddi3/customer-churn-mlops/blob/main/src/mlflow_utils.py): `src/mlflow_utils.py`
- **MLflow Tracking**
- [Path Configuration](https://github.com/waddi3/customer-churn-mlops/blob/main/src/config.py): `src/config.py`
- [Application Logging](https://github.com/waddi3/customer-churn-mlops/blob/main/src/logger.py): `src/logger.py`

### Other components

- **Pipeline User**

## Connections

- Pipeline User → Pipeline Runner: starts (evidence: `README.md`)
- Pipeline Runner → MLflow Setup: configures (evidence: `run_pipeline.py`)
- Pipeline Runner → Data Loading: loads data (evidence: `run_pipeline.py`)
- Data Loading → Raw Workbook: reads (evidence: `src/data_loader.py`)
- Pipeline Runner → Exploratory Analysis: runs analysis (evidence: `run_pipeline.py`)
- Pipeline Runner → Preprocessing: preprocesses (evidence: `run_pipeline.py`)
- Preprocessing → Cleaned Dataset: writes (evidence: `src/preprocessing.py`)
- Pipeline Runner → Feature Engineering: engineers features (evidence: `run_pipeline.py`)
- Feature Engineering → Processed Dataset: writes (evidence: `src/feature_engineering.py`)
- Pipeline Runner → Model Training: trains models (evidence: `run_pipeline.py`)
- Model Training → Saved Model Artifacts: saves best model (evidence: `src/train.py`)
- Model Training → MLflow Tracking: logs runs (evidence: `src/train.py`)
- Pipeline Runner → Model Evaluation: evaluates model (evidence: `run_pipeline.py`)
- Model Evaluation → MLflow Tracking: logs artifacts (evidence: `src/evaluate.py`)
- MLflow Setup → MLflow Tracking: configures store (evidence: `src/mlflow_utils.py`)
- Data Loading → Path Configuration: uses data path (evidence: `src/data_loader.py`)
- Preprocessing → Path Configuration: uses output path (evidence: `src/preprocessing.py`)
- Feature Engineering → Path Configuration: uses output paths (evidence: `src/feature_engineering.py`)
- Model Training → Path Configuration: uses model path (evidence: `src/train.py`)
- Data Loading → Application Logging: logs progress (evidence: `src/data_loader.py`)
- Preprocessing → Application Logging: logs progress (evidence: `src/preprocessing.py`)
- Feature Engineering → Application Logging: logs progress (evidence: `src/feature_engineering.py`)
- Model Training → Application Logging: logs progress (evidence: `src/train.py`)
- Model Evaluation → Application Logging: logs metrics (evidence: `src/evaluate.py`)
