How mihirj2002/customer-churn-prediction-ml-orchestration works
This repository trains and compares churn classifiers through a Prefect-orchestrated workflow: load customer data, preprocess and split it, train several models, evaluate them, and log metrics to MLflow. A separate Streamlit interface currently accepts customer details but only displays a placeholder; it does not run predictions. Cross-validation model selection and model saving are implemented as standalone modules but are not called by the workflow. The included CSV is not the ingestion source shown in code, which fetches data from a remote URL.
Main entry points: workflow.py Prefect Workflow · app.py Prediction Interface · data_ingestion.py CSV Loader · main.py CLI Entry Point
Components 17
User Interfaces
- CLI Entry Point
main.py - Prediction Interface
app.py
Workflow Orchestration
- Prefect Workflow
src/workflow.py - Ingestion Task
src/workflow.py - Preprocessing Task
src/workflow.py - Training Task
src/workflow.py - Evaluation Task
src/workflow.py
Churn ML Pipeline
- CSV Loader
src/data_ingestion.py - Feature Preprocessing
src/data_preprocessing.py - Model Training
src/model_training.py - Cross-Validation Selection
src/model_selection.py - Metric Evaluation
src/model_evaluation.py - Model Saving
src/model_saving.py
Experiment Tracking
- MLflow Tracking
- MLflow SQLite Store
Other components
- User
- Remote Churn CSV
Connections 15
- User → Prediction Interface: enters details
app.py - Prediction Interface → User: shows placeholder
app.py - CLI Entry Point → Prefect Workflow: runs workflow
main.py - Prefect Workflow → Ingestion Task: dispatches
src/workflow.py - Prefect Workflow → Preprocessing Task: dispatches data
src/workflow.py - Prefect Workflow → Training Task: dispatches features
src/workflow.py - Prefect Workflow → Evaluation Task: dispatches models
src/workflow.py - Ingestion Task → CSV Loader: calls
src/workflow.py - CSV Loader → Remote Churn CSV: fetches CSV
src/data_ingestion.py - Preprocessing Task → Feature Preprocessing: calls
src/workflow.py - Training Task → Model Training: calls
src/workflow.py - Evaluation Task → Metric Evaluation: evaluates models
src/workflow.py - Evaluation Task → MLflow Tracking: logs metrics
src/workflow.py - Prefect Workflow → MLflow Tracking: configures tracking
src/workflow.py - MLflow Tracking → MLflow SQLite Store: stores runs