# odakris/churn-mlops-pipeline architecture

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

- Interactive diagram: https://gitdiagram.com/odakris/churn-mlops-pipeline
- Repository: https://github.com/odakris/churn-mlops-pipeline

## Overview

This is a configurable telecom churn-classification application. Its main workflow downloads Telco customer data, cleans and splits it, trains a tuned scikit-learn pipeline with MLflow tracking, and evaluates it; separate serving paths provide JSON/web and batch inference. The graph distinguishes orchestration from the stage implementations and includes configuration, model construction, and persisted artifacts. The README documents several capabilities whose implementation was not sampled; those links are cited to the README rather than presented as inspected source behavior.

Main entry points: [`src/config.py`](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/config.py) (Typed configuration), [`src/predict.py`](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/predict.py) (Batch prediction), [`src/train.py`](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/train.py) (Tune and train), [`src/evaluate.py`](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/evaluate.py) (Test evaluation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Training workflow"]
  node_runner["Pipeline runner<br/>[run_pipeline.py]"]
  node_download["Data download<br/>[get_data.py]"]
  node_preprocess["Clean and split<br/>[preprocess.py]"]
  node_trainer["Tune and train<br/>[train.py]"]
  node_evaluation["Test evaluation<br/>[evaluate.py]"]
end

subgraph group_model["Model and configuration"]
  node_estimator["Pipeline builder<br/>[pipeline.py]"]
  node_config["Typed configuration<br/>[config.py]"]
  node_yaml["Project settings<br/>[config.yaml]"]
end

subgraph group_serving["Inference interfaces"]
  node_api["JSON inference API<br/>[api.py]"]
  node_web["Web interface<br/>[index.html]"]
  node_batch["Batch prediction<br/>[predict.py]"]
  node_results["Prediction results<br/>[predict.py]"]
end

subgraph group_operations["Tracking and artifacts"]
  node_training_data["Prepared datasets"]
  node_tracking[("MLflow tracking and registry")]
  node_model_files["Saved model and metadata"]
  node_reports["Evaluation reports"]
end

node_operator(("Project operator"))
node_source_data["Source dataset"]
node_new_clients["New client CSV"]

node_operator -->|"starts"| node_runner
node_runner -->|"calls"| node_download
node_runner -->|"calls"| node_preprocess
node_runner -->|"calls"| node_trainer
node_runner -->|"calls"| node_evaluation
node_download -->|"downloads"| node_source_data
node_download -->|"loads settings"| node_config
node_preprocess -->|"loads settings"| node_config
node_preprocess -->|"writes splits"| node_training_data
node_training_data -->|"provides training data"| node_trainer
node_training_data -->|"provides test data"| node_evaluation
node_trainer -->|"loads settings"| node_config
node_trainer -->|"builds search pipeline"| node_estimator
node_trainer -->|"writes model metadata"| node_model_files
node_trainer -->|"logs and registers"| node_tracking
node_estimator -->|"uses model settings"| node_config
node_config -->|"loads settings"| node_yaml
node_evaluation -->|"loads settings"| node_config
node_evaluation -->|"loads model"| node_model_files
node_evaluation -->|"writes metrics and plots"| node_reports
node_evaluation -->|"logs evaluation"| node_tracking
node_operator -->|"uses"| node_api
node_api -->|"loads settings"| node_config
node_api -->|"loads model"| node_model_files
node_api -->|"reads reference data"| node_training_data
node_api -->|"serves page"| node_web
node_operator -->|"runs"| node_batch
node_batch -->|"loads settings"| node_config
node_batch -->|"reads CSV"| node_new_clients
node_batch -->|"loads local model"| node_model_files
node_batch -->|"loads registry model"| node_tracking
node_batch -->|"writes predictions"| node_results

click node_runner "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/run_pipeline.py"
click node_download "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/get_data.py"
click node_preprocess "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/preprocess.py"
click node_training_data "https://github.com/odakris/churn-mlops-pipeline/tree/master/data"
click node_trainer "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/train.py"
click node_estimator "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/pipeline.py"
click node_config "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/config.py"
click node_yaml "https://github.com/odakris/churn-mlops-pipeline/blob/master/configs/config.yaml"
click node_evaluation "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/evaluate.py"
click node_model_files "https://github.com/odakris/churn-mlops-pipeline/tree/master/data"
click node_reports "https://github.com/odakris/churn-mlops-pipeline/tree/master/data"
click node_api "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/api.py"
click node_web "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/static/index.html"
click node_batch "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/predict.py"
click node_results "https://github.com/odakris/churn-mlops-pipeline/blob/master/src/predict.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_download,node_preprocess,node_trainer,node_evaluation,node_new_clients toneBlue
class node_estimator,node_config,node_yaml toneAmber
class node_api,node_web,node_batch,node_results toneMint
class node_training_data,node_tracking,node_model_files,node_reports toneRose
class node_operator,node_source_data toneIndigo
```

## Components

### Training workflow

- [Pipeline runner](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/run_pipeline.py): `src/run_pipeline.py`
- [Data download](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/get_data.py): `src/get_data.py`
- [Clean and split](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/preprocess.py): `src/preprocess.py`
- [Tune and train](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/train.py): `src/train.py`
- [Test evaluation](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/evaluate.py): `src/evaluate.py`

### Model and configuration

- [Pipeline builder](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/pipeline.py): `src/pipeline.py`
- [Typed configuration](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/config.py): `src/config.py`
- [Project settings](https://github.com/odakris/churn-mlops-pipeline/blob/master/configs/config.yaml): `configs/config.yaml`

### Inference interfaces

- [JSON inference API](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/api.py): `src/api.py`
- [Web interface](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/static/index.html): `src/static/index.html`
- [Batch prediction](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/predict.py): `src/predict.py`
- [Prediction results](https://github.com/odakris/churn-mlops-pipeline/blob/master/src/predict.py): `src/predict.py`

### Tracking and artifacts

- [Prepared datasets](https://github.com/odakris/churn-mlops-pipeline/tree/master/data): `data`
- **MLflow tracking and registry**
- [Saved model and metadata](https://github.com/odakris/churn-mlops-pipeline/tree/master/data): `data`
- [Evaluation reports](https://github.com/odakris/churn-mlops-pipeline/tree/master/data): `data`

### Other components

- **Project operator**
- **Source dataset**
- **New client CSV**

## Connections

- Project operator → Pipeline runner: starts (evidence: `README.md`)
- Pipeline runner → Data download: calls (evidence: `src/run_pipeline.py`)
- Pipeline runner → Clean and split: calls (evidence: `src/run_pipeline.py`)
- Pipeline runner → Tune and train: calls (evidence: `src/run_pipeline.py`)
- Pipeline runner → Test evaluation: calls (evidence: `src/run_pipeline.py`)
- Data download → Source dataset: downloads (evidence: `README.md`)
- Data download → Typed configuration: loads settings (evidence: `src/get_data.py`)
- Clean and split → Typed configuration: loads settings (evidence: `src/preprocess.py`)
- Clean and split → Prepared datasets: writes splits (evidence: `src/preprocess.py`)
- Prepared datasets → Tune and train: provides training data (evidence: `README.md`)
- Prepared datasets → Test evaluation: provides test data (evidence: `README.md`)
- Tune and train → Typed configuration: loads settings (evidence: `src/train.py`)
- Tune and train → Pipeline builder: builds search pipeline (evidence: `src/train.py`)
- Tune and train → Saved model and metadata: writes model metadata (evidence: `src/train.py`)
- Tune and train → MLflow tracking and registry: logs and registers (evidence: `src/train.py`)
- Pipeline builder → Typed configuration: uses model settings (evidence: `src/pipeline.py`)
- Typed configuration → Project settings: loads settings (evidence: `README.md`)
- Test evaluation → Typed configuration: loads settings (evidence: `src/evaluate.py`)
- Test evaluation → Saved model and metadata: loads model (evidence: `src/evaluate.py`)
- Test evaluation → Evaluation reports: writes metrics and plots (evidence: `src/evaluate.py`)
- Test evaluation → MLflow tracking and registry: logs evaluation (evidence: `src/evaluate.py`)
- Project operator → JSON inference API: uses (evidence: `README.md`)
- JSON inference API → Typed configuration: loads settings (evidence: `src/api.py`)
- JSON inference API → Saved model and metadata: loads model (evidence: `src/api.py`)
- JSON inference API → Prepared datasets: reads reference data (evidence: `src/api.py`)
- JSON inference API → Web interface: serves page (evidence: `README.md`)
- Project operator → Batch prediction: runs (evidence: `README.md`)
- Batch prediction → Typed configuration: loads settings (evidence: `src/predict.py`)
- Batch prediction → New client CSV: reads CSV (evidence: `src/predict.py`)
- Batch prediction → Saved model and metadata: loads local model (evidence: `src/predict.py`)
- Batch prediction → MLflow tracking and registry: loads registry model (evidence: `src/predict.py`)
- Batch prediction → Prediction results: writes predictions (evidence: `src/predict.py`)
