# chandanc5525/mlops_predictivemaintainace architecture

> Architecture diagram of the GitHub repository chandanc5525/mlops_predictivemaintainace, 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/chandanc5525/mlops_predictivemaintainace
- Repository: https://github.com/chandanc5525/mlops_predictivemaintainace

## Overview

This repository implements a predictive-maintenance classification pipeline for coal-mine equipment. The evidenced workflow starts at the pipeline entry point: it ingests sensor and operating data, preprocesses and balances it, trains an AutoML classifier, predicts on held-out data, and evaluates the predictions. Training persists a model that prediction reloads. The tree also contains an app scaffold and MLOps tracking artifacts, but the sampled app modules are empty and no tracking integration is shown; those connections are therefore not asserted.

Main entry points: [`mlops/main.py`](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/main.py) (Pipeline entry), [`mlops/src/data_ingestion.py`](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/data_ingestion.py) (Data ingestion), [`mlops/src/model_builder.py`](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_builder.py) (AutoML training), [`mlops/src/model_predictor.py`](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_predictor.py) (Model prediction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pipeline["Pipeline orchestration"]
  node_entry["Pipeline entry<br/>[main.py]"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_preprocessing["Data preprocessing"]
  node_logging["Logging<br/>[logger.py]"]
end

subgraph group_ml["Model workflow"]
  node_builder["AutoML training<br/>[model_builder.py]"]
  node_predictor["Model prediction<br/>[model_predictor.py]"]
  node_evaluator["Model evaluation<br/>[model_evaluator.py]"]
end

subgraph group_state["Data and artifacts"]
  node_dataset["Raw dataset"]
  node_model[("Saved classifier<br/>[best_model.pkl]")]
end

node_operator(("Pipeline operator"))

node_operator -.->|"runs"| node_entry
node_entry -->|"calls"| node_ingestion
node_ingestion -->|"reads"| node_dataset
node_entry -->|"calls"| node_preprocessing
node_entry -->|"calls"| node_builder
node_entry -->|"calls"| node_predictor
node_entry -->|"calls"| node_evaluator
node_builder -->|"writes"| node_model
node_predictor -->|"loads"| node_model

click node_entry "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/main.py"
click node_ingestion "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/data_ingestion.py"
click node_preprocessing "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/data_preprocessing.py"
click node_logging "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/logger.py"
click node_builder "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_builder.py"
click node_predictor "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_predictor.py"
click node_evaluator "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_evaluator.py"
click node_dataset "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/data/raw/preventative_maintainance_dataset.csv.dvc"
click node_model "https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/models/best_model.pkl"

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_logging toneBlue
class node_builder,node_predictor,node_evaluator toneAmber
class node_dataset,node_model toneMint
class node_operator toneIndigo
```

## Components

### Pipeline orchestration

- [Pipeline entry](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/main.py): `mlops/main.py`
- [Data ingestion](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/data_ingestion.py): `mlops/src/data_ingestion.py`
- [Data preprocessing](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/data_preprocessing.py): `mlops/src/data_preprocessing.py`
- [Logging](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/logger.py): `mlops/src/logger.py`

### Model workflow

- [AutoML training](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_builder.py): `mlops/src/model_builder.py`
- [Model prediction](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_predictor.py): `mlops/src/model_predictor.py`
- [Model evaluation](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/src/model_evaluator.py): `mlops/src/model_evaluator.py`

### Data and artifacts

- [Raw dataset](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/data/raw/preventative_maintainance_dataset.csv.dvc): `mlops/data/raw/preventative_maintainance_dataset.csv.dvc`
- [Saved classifier](https://github.com/chandanc5525/mlops_predictivemaintainace/blob/main/mlops/models/best_model.pkl): `mlops/models/best_model.pkl`

### Other components

- **Pipeline operator**

## Connections

- Pipeline operator → Pipeline entry: runs
- Pipeline entry → Data ingestion: calls (evidence: `mlops/main.py`)
- Data ingestion → Raw dataset: reads (evidence: `mlops/src/data_ingestion.py`)
- Pipeline entry → Data preprocessing: calls (evidence: `mlops/main.py`)
- Pipeline entry → AutoML training: calls (evidence: `mlops/main.py`)
- Pipeline entry → Model prediction: calls (evidence: `mlops/main.py`)
- Pipeline entry → Model evaluation: calls (evidence: `mlops/main.py`)
- AutoML training → Saved classifier: writes (evidence: `mlops/src/model_builder.py`)
- Model prediction → Saved classifier: loads (evidence: `mlops/src/model_predictor.py`)
