Downloads Β· 30 days
0
raj8668/Engine-Predictive-Maintenence
Engine-Predictive-Maintenence is a machine learning model from raj8668. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
π Status: Complete - All pipeline steps successfully deployed!
Downloads Β· 30 days
0
Access
Public
Updated Feb 28, 2026
Repo size
β
Likes
0
Public
Click a slice to open those files.
.md55.3 KB Β· 50%
From the Hugging Face model README
π Status: Complete - All pipeline steps successfully deployed!
This project builds an endβtoβend predictive maintenance system for small and large engines using sensor data (RPM, pressures, temperatures) to classify whether an engine is healthy or requires maintenance.
The work is organized to satisfy the provided interim and final report rubrics, including:
Interactive Streamlit application for real-time engine condition predictions with sensor visualizations.
π¦ View Model on Hugging Face
Trained Random Forest model with hyperparameter tuning, versioned on Hugging Face Model Hub.
π Access Dataset Repository
Version-controlled datasets including raw data and train/test splits.
Complete source code, documentation, and CI/CD pipeline.
Automated CI/CD pipeline with 4 sequential jobs for data registration, preparation, training, and deployment.
mlops/
βββ data/ # Raw and processed data
β βββ engine_data.csv # Original engine sensor dataset
β βββ processed/ # Train/test splits
β βββ train.csv
β βββ test.csv
βββ notebooks/ # EDA and experimentation notebooks
βββ src/ # Main source code
β βββ config.py # Central configuration
β βββ data_register.py # Register raw data to HF Dataset
β βββ data_prep.py # Data cleaning and splitting
β βββ hf_data_utils.py # HF Dataset Hub utilities
β βββ train.py # Model training with MLflow
β βββ hf_model_utils.py # HF Model Hub utilities
β βββ inference.py # Prediction utilities
β βββ app.py # Streamlit web application
β βββ deploy_to_hf.py # Deploy to HF Space
βββ .github/
β βββ workflows/
β βββ pipeline.yml # CI/CD pipeline
βββ Dockerfile # Container definition for deployment
βββ requirements.txt # Python dependencies
βββ README.md # This file
src/config.py β Central configuration (paths, Hugging Face repo names, MLflow config)src/data_register.py β Registers raw dataset to Hugging Face Dataset Hubsrc/data_prep.py β Loads data, cleans it, and creates train/test splitssrc/train.py β Model training, hyperparameter tuning, MLflow loggingsrc/app.py β Streamlit web application for interactive predictionssrc/deploy_to_hf.py β Deploys app to Hugging Face Space.github/workflows/pipeline.yml β Automated CI/CD pipelineThe MLOps pipeline consists of 6 stages, automated via GitHub Actions:
src/data_register.pyananttripathiak/engine-maintenance-dataset with data/engine_data.csvsrc/eda.py (or use notebooks)src/data_prep.pydata/train.csv and data/test.csv in dataset reposrc/train.pyananttripathiak/engine-maintenance-model with trained modelsrc/app.py - Streamlit web applicationDockerfile - Container definitionsrc/deploy_to_hf.py - Deploys to Hugging Face Spaceananttripathiak/engine-maintenance-space.github/workflows/pipeline.ymlregister-dataset β runs src/data_register.pydata-prep β runs src/data_prep.pymodel-training β runs src/train.pydeploy-hosting β runs src/deploy_to_hf.pyClone the repository:
git clone https://github.com/ananttripathi/engine-predictive-maintenance.git
cd engine-predictive-maintenance
Set up virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
Run pipeline steps:
# Register data
python src/data_register.py
# Prepare data
python src/data_prep.py
# Train model
python src/train.py
# Run app locally
streamlit run src/app.py
The pipeline runs automatically on every push to main branch via GitHub Actions. View workflow runs at:
π GitHub Actions
This project is configured with:
ananttripathiakananttripathiananttripathiak/engine-maintenance-datasetananttripathiak/engine-maintenance-modelananttripathiak/engine-maintenance-spaceananttripathi/engine-predictive-maintenanceUpdate src/config.py with your Hugging Face username:
HF_DATASET_REPO = os.getenv("HF_DATASET_REPO", "ananttripathiak/engine-maintenance-dataset")
HF_MODEL_REPO = os.getenv("HF_MODEL_REPO", "ananttripathiak/engine-maintenance-model")
HF_SPACE_REPO = os.getenv("HF_SPACE_REPO", "ananttripathiak/engine-maintenance-space")
Or set environment variables:
export HF_TOKEN="hf_your_token_here"
export HF_DATASET_REPO="ananttripathiak/engine-maintenance-dataset"
export HF_MODEL_REPO="ananttripathiak/engine-maintenance-model"
export HF_SPACE_REPO="ananttripathiak/engine-maintenance-space"
A. Create GitHub Repository:
engine-predictive-maintenance)mlops folder to it:
git init
git add .
git commit -m "Initial commit: Predictive maintenance MLOps pipeline"
git remote add origin https://github.com/your-username/engine-predictive-maintenance.git
git push -u origin main
B. Add GitHub Secrets: Go to your GitHub repo β Settings β Secrets and variables β Actions β New repository secret
Add these 4 secrets:
HF_TOKEN β Your Hugging Face access token (from https://huggingface.co/settings/tokens)HF_DATASET_REPO β e.g., ananttripathiak/engine-maintenance-datasetHF_MODEL_REPO β e.g., ananttripathiak/engine-maintenance-modelHF_SPACE_REPO β e.g., ananttripathiak/engine-maintenance-spaceπ For detailed setup instructions, see CONFIGURATION_GUIDE.md