# sanikaghate910/mlops_predictivemaintenance architecture

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

- Interactive diagram: https://gitdiagram.com/sanikaghate910/mlops_predictivemaintenance
- Repository: https://github.com/sanikaghate910/mlops_predictivemaintenance

## Overview

This repository is a coal-mine conveyor bearing predictive-maintenance project: its stated goal is to flag failures within seven days, while the implemented runtime is a batch training-and-evaluation pipeline. The main entry point orchestrates ingestion, preprocessing, model fitting, prediction, and evaluation; preprocessing handles splitting, encoding, scaling, and class balancing. The model is persisted and then loaded for prediction. The README also describes sensor-based risk analysis and maintenance planning, but no sampled implementation establishes a separate explanation or operational-planning subsystem. The app files were empty in the excerpts, so they are omitted.

Main entry points: [`main.py`](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/main.py) (Pipeline entry point), [`src/logger.py`](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/logger.py) (Logging), [`src/model_builder.py`](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_builder.py) (AutoML training), [`src/model_predictor.py`](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_predictor.py) (Model prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Pipeline Workflow"]
  node_entry["Pipeline entry point<br/>[main.py]"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_preprocessing["Data preprocessing"]
  node_dataset[("Bearing readings")]
end

subgraph group_modeling["Modeling"]
  node_automl["AutoML training<br/>[model_builder.py]"]
  node_modelstore[("Saved model<br/>[best_model.pkl]")]
  node_prediction["Model prediction<br/>[model_predictor.py]"]
  node_evaluation["Metrics evaluation<br/>[model_evaluator.py]"]
end

subgraph group_operations["Runtime Support"]
  node_logger["Logging<br/>[logger.py]"]
end

node_operator(("Pipeline operator"))

node_operator -->|"runs"| node_entry
node_entry -->|"calls"| node_ingestion
node_entry -->|"calls"| node_preprocessing
node_entry -->|"calls"| node_automl
node_entry -->|"calls"| node_prediction
node_entry -->|"calls"| node_evaluation
node_automl -->|"writes model"| node_modelstore
node_prediction -->|"loads model"| node_modelstore
node_ingestion -->|"logs"| node_logger
node_preprocessing -->|"logs"| node_logger
node_automl -->|"logs"| node_logger
node_prediction -->|"logs"| node_logger
node_evaluation -->|"logs"| node_logger

click node_entry "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/main.py"
click node_ingestion "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/data_ingestion.py"
click node_preprocessing "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/data_preprocessing.py"
click node_dataset "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/data/raw/preventative_maintainance_dataset.csv"
click node_automl "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_builder.py"
click node_modelstore "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/models/best_model.pkl"
click node_prediction "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_predictor.py"
click node_evaluation "https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_evaluator.py"
click node_logger "https://github.com/sanikaghate910/mlops_predictivemaintenance/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_entry,node_ingestion,node_preprocessing,node_dataset toneBlue
class node_automl,node_modelstore,node_prediction,node_evaluation toneAmber
class node_logger toneMint
class node_operator toneIndigo
```

## Components

### Pipeline Workflow

- [Pipeline entry point](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/main.py): `main.py`
- [Data ingestion](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/data_ingestion.py): `src/data_ingestion.py`
- [Data preprocessing](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`
- [Bearing readings](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/data/raw/preventative_maintainance_dataset.csv): `data/raw/preventative_maintainance_dataset.csv`

### Modeling

- [AutoML training](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_builder.py): `src/model_builder.py`
- [Saved model](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/models/best_model.pkl): `models/best_model.pkl`
- [Model prediction](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_predictor.py): `src/model_predictor.py`
- [Metrics evaluation](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/model_evaluator.py): `src/model_evaluator.py`

### Runtime Support

- [Logging](https://github.com/sanikaghate910/mlops_predictivemaintenance/blob/main/src/logger.py): `src/logger.py`

### Other components

- **Pipeline operator**

## Connections

- Pipeline operator → Pipeline entry point: runs (evidence: `main.py`)
- Pipeline entry point → Data ingestion: calls (evidence: `main.py`)
- Pipeline entry point → Data preprocessing: calls (evidence: `main.py`)
- Pipeline entry point → AutoML training: calls (evidence: `main.py`)
- Pipeline entry point → Model prediction: calls (evidence: `main.py`)
- Pipeline entry point → Metrics evaluation: calls (evidence: `main.py`)
- AutoML training → Saved model: writes model (evidence: `src/model_builder.py`)
- Model prediction → Saved model: loads model (evidence: `src/model_predictor.py`)
- Data ingestion → Logging: logs (evidence: `src/data_ingestion.py`)
- Data preprocessing → Logging: logs (evidence: `src/data_preprocessing.py`)
- AutoML training → Logging: logs (evidence: `src/model_builder.py`)
- Model prediction → Logging: logs (evidence: `src/model_predictor.py`)
- Metrics evaluation → Logging: logs (evidence: `src/model_evaluator.py`)
