# sahilkavathekar7070-cyber/mlops_predictivemaintainance architecture

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

- Interactive diagram: https://gitdiagram.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance
- Repository: https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance

## Overview

This repository presents a stage-based ML template: users run pipeline stages through a CLI, producing data and models for evaluation and prediction; the README also describes a REST API and web console. The graph follows those documented capabilities, while distinguishing the nested `mlops/` predictive-maintenance code. Several root source excerpts are empty, and the documented `src/api.py` is absent from the tree, so implementation-level links for serving are limited to paths that exist; edges cite only the README or shown calls.

Main entry points: [`main.py`](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/main.py) (Pipeline CLI), [`src/data_ingestion.py`](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_ingestion.py) (Data ingestion), [`src/data_preprocessing.py`](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_preprocessing.py) (Preprocessing), [`src/model_building.py`](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_building.py) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["ML workflow"]
  node_cli["Pipeline CLI<br/>[main.py]"]
  node_config["Configuration<br/>[config.yaml]"]
  node_ingest["Data ingestion<br/>[data_ingestion.py]"]
  node_raw[("Raw data")]
  node_preprocess["Preprocessing"]
  node_interim[("Interim data")]
  node_processed[("Processed data")]
  node_train["Model training<br/>[model_building.py]"]
  node_registry[("Model registry")]
  node_evaluate["Model evaluation"]
  node_reports[("Evaluation reports")]
  node_predict["Prediction"]
  node_logging["Logging utilities<br/>[utils.py]"]
end

subgraph group_serving["Serving interface"]
  node_web["Web console<br/>[index.html]"]
  node_api["REST API<br/>[main.py]"]
end

subgraph group_nested["Nested MLOps app"]
  node_appservice["App service<br/>[service.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_mlmain["Nested pipeline entry<br/>[main.py]"]
  node_mlingest["Maintenance ingestion<br/>[data_ingestion.py]"]
  node_mlpreprocess["Maintenance preprocessing"]
  node_mltrain["Maintenance training<br/>[model_builder.py]"]
  node_mlevaluate["Maintenance evaluation<br/>[model_evaluator.py]"]
  node_mlpredict["Maintenance prediction<br/>[model_predictor.py]"]
  node_mllogging["Nested logging<br/>[logger.py]"]
end

node_user(("CLI user"))
node_browser(("Browser user"))

node_user -->|"runs stages"| node_cli
node_cli -->|"dispatches stages"| node_ingest
node_cli -->|"dispatches stages"| node_preprocess
node_cli -->|"dispatches stages"| node_train
node_cli -->|"dispatches stages"| node_evaluate
node_cli -->|"dispatches stages"| node_predict
node_config -->|"configures"| node_ingest
node_config -->|"configures"| node_preprocess
node_config -->|"configures"| node_train
node_raw -->|"reads"| node_ingest
node_ingest -->|"writes"| node_interim
node_interim -->|"reads"| node_preprocess
node_preprocess -->|"writes"| node_processed
node_processed -->|"reads"| node_train
node_train -->|"saves model"| node_registry
node_processed -->|"reads"| node_evaluate
node_registry -->|"loads model"| node_evaluate
node_evaluate -->|"writes metrics"| node_reports
node_registry -->|"loads model"| node_predict
node_browser -->|"uses"| node_web
node_web -->|"HTTP requests"| node_api
node_mlmain -->|"calls"| node_mlingest
node_mlmain -->|"imports"| node_mllogging
node_mlingest -->|"logs through"| node_mllogging

click node_cli "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/main.py"
click node_config "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/config.yaml"
click node_ingest "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_ingestion.py"
click node_raw "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/raw"
click node_preprocess "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_preprocessing.py"
click node_interim "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/interim"
click node_processed "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/processed"
click node_train "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_building.py"
click node_registry "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/models"
click node_evaluate "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_evaluation.py"
click node_reports "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/reports"
click node_predict "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_prediction.py"
click node_logging "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/utils.py"
click node_web "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/frontend/index.html"
click node_api "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/main.py"
click node_appservice "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/service.py"
click node_schemas "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/schemas.py"
click node_mlmain "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/main.py"
click node_mlingest "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/data_ingestion.py"
click node_mlpreprocess "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/data_preprocessing.py"
click node_mltrain "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_builder.py"
click node_mlevaluate "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_evaluator.py"
click node_mlpredict "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_predictor.py"
click node_mllogging "https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/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_cli,node_config,node_ingest,node_raw,node_preprocess,node_interim,node_processed,node_train,node_registry,node_evaluate,node_reports,node_predict,node_logging,node_user,node_browser toneBlue
class node_web,node_api toneAmber
class node_appservice,node_schemas,node_mlmain,node_mlingest,node_mlpreprocess,node_mltrain,node_mlevaluate,node_mlpredict,node_mllogging toneMint
```

## Components

### ML workflow

- [Pipeline CLI](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/main.py): `main.py`
- [Configuration](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/config.yaml): `config.yaml`
- [Data ingestion](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_ingestion.py): `src/data_ingestion.py`
- [Raw data](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/raw): `data/raw`
- [Preprocessing](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`
- [Interim data](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/interim): `data/interim`
- [Processed data](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/data/processed): `data/processed`
- [Model training](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_building.py): `src/model_building.py`
- [Model registry](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/models): `models`
- [Model evaluation](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_evaluation.py): `src/model_evaluation.py`
- [Evaluation reports](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/tree/main/reports): `reports`
- [Prediction](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/model_prediction.py): `src/model_prediction.py`
- [Logging utilities](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/src/utils.py): `src/utils.py`

### Serving interface

- [Web console](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/frontend/index.html): `frontend/index.html`
- [REST API](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/main.py): `mlops/app/main.py`

### Nested MLOps app

- [App service](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/service.py): `mlops/app/service.py`
- [API schemas](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/app/schemas.py): `mlops/app/schemas.py`
- [Nested pipeline entry](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/main.py): `mlops/main.py`
- [Maintenance ingestion](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/data_ingestion.py): `mlops/src/data_ingestion.py`
- [Maintenance preprocessing](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/data_preprocessing.py): `mlops/src/data_preprocessing.py`
- [Maintenance training](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_builder.py): `mlops/src/model_builder.py`
- [Maintenance evaluation](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_evaluator.py): `mlops/src/model_evaluator.py`
- [Maintenance prediction](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/model_predictor.py): `mlops/src/model_predictor.py`
- [Nested logging](https://github.com/sahilkavathekar7070-cyber/mlops_predictivemaintainance/blob/main/mlops/src/logger.py): `mlops/src/logger.py`

### Other components

- **CLI user**
- **Browser user**

## Connections

- CLI user → Pipeline CLI: runs stages (evidence: `README.md`)
- Pipeline CLI → Data ingestion: dispatches stages (evidence: `README.md`)
- Pipeline CLI → Preprocessing: dispatches stages (evidence: `README.md`)
- Pipeline CLI → Model training: dispatches stages (evidence: `README.md`)
- Pipeline CLI → Model evaluation: dispatches stages (evidence: `README.md`)
- Pipeline CLI → Prediction: dispatches stages (evidence: `README.md`)
- Configuration → Data ingestion: configures (evidence: `README.md`)
- Configuration → Preprocessing: configures (evidence: `README.md`)
- Configuration → Model training: configures (evidence: `README.md`)
- Raw data → Data ingestion: reads (evidence: `README.md`)
- Data ingestion → Interim data: writes (evidence: `README.md`)
- Interim data → Preprocessing: reads (evidence: `README.md`)
- Preprocessing → Processed data: writes (evidence: `README.md`)
- Processed data → Model training: reads (evidence: `README.md`)
- Model training → Model registry: saves model (evidence: `README.md`)
- Processed data → Model evaluation: reads (evidence: `README.md`)
- Model registry → Model evaluation: loads model (evidence: `README.md`)
- Model evaluation → Evaluation reports: writes metrics (evidence: `README.md`)
- Model registry → Prediction: loads model (evidence: `README.md`)
- Browser user → Web console: uses (evidence: `README.md`)
- Web console → REST API: HTTP requests (evidence: `README.md`)
- Nested pipeline entry → Maintenance ingestion: calls (evidence: `mlops/main.py`)
- Nested pipeline entry → Nested logging: imports (evidence: `mlops/main.py`)
- Maintenance ingestion → Nested logging: logs through (evidence: `mlops/src/data_ingestion.py`)
