Skip to content

End-to-end MLOps pipeline for predictive maintenance using sensor data. Features automated model training, drift detection, FastAPI deployment, and comprehensive monitoring with 92% accuracy in failure prediction.

License

Notifications You must be signed in to change notification settings

Sa1f27/predictive-maintenance-mlops

Repository files navigation

🔧 Predictive Maintenance System with MLOps Pipeline

Industrial IoT AnalyticsMachine LearningMLOpsProduction Deployment

A complete ML system to predict equipment failures before they happen, built with modern MLOps practices: experiment tracking, model versioning, containerized deployment, and automated workflows.


🎯 Highlights

  • 88–92% accuracy across multiple equipment types
  • <100ms latency for real-time predictions
  • End-to-end pipeline: data ingestion → model training → API deployment
  • Production-ready FastAPI service with health endpoints and Pydantic validation
  • Fully containerized via Docker for local & cloud use

📊 Project Overview

Predictive maintenance allows manufacturers to schedule repairs before breakdowns, reducing downtime and costs. This project processes sensor data (temperature, torque, speed, tool wear) to predict failures using ML models and serves predictions via a web API.


🛠 Technical Stack

ML: scikit-learn, pandas, numpy, SMOTE

API: FastAPI, Pydantic

MLOps: MLflow (experiment tracking & model registry)

Containerization: Docker, Docker Compose

CI/CD: GitHub Actions

Deployment: AWS ECR + ECS


📁 Architecture

Data Pipeline → Model Training (MLflow) → FastAPI API → Docker → AWS ECS

📸 Screenshots

Capture

Capture1

Capture3

Capture4

Capture5

Capture6

Screenshot 2025-08-15 120611

📈 Model Performance

Model Accuracy Precision Recall F1-Score
Random Forest 91.2% 89.4% 92.1% 90.7%
Gradient Boosting 89.8% 87.3% 91.5% 89.3%
Logistic Regression 86.4% 84.1% 88.7% 86.3%
SVM 88.1% 85.9% 90.2% 88.0%

Feature Importance:

  1. Tool Wear (32%)
  2. Temperature Differential (24%)
  3. Torque Variance (21%)
  4. Rotational Speed (15%)
  5. Equipment Type (8%)

🚀 Quick Start

git clone https://github.com/Sa1f27/predictive-maintenance-mlops.git
cd predictive-maintenance-mlops

# Setup environment
python -m venv venv
venv\Scripts\activate  # Windows
pip install -r requirements.txt

# Train model
python run_pipeline.py --mode train

# Start API
python app.py

Docker Deployment

docker-compose up -d --build

🔮 Future Improvements

  • Advanced feature engineering (rolling stats, lag features)
  • Ensemble/stacking models
  • Real-time data streaming with automated retraining
  • Advanced monitoring with dashboards

About

End-to-end MLOps pipeline for predictive maintenance using sensor data. Features automated model training, drift detection, FastAPI deployment, and comprehensive monitoring with 92% accuracy in failure prediction.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published