# riyak0583/mlops_prediction architecture

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

- Interactive diagram: https://gitdiagram.com/riyak0583/mlops_prediction
- Repository: https://github.com/riyak0583/mlops_prediction

## Overview

This repository is an incomplete coal-mine predictive-maintenance ML workflow. Its implemented path is: load the maintenance CSV, clean and split the data, encode and scale features, balance the training set, then return the prepared arrays to the entry point. Logging is an internal supporting layer. The model-building, evaluation, and prediction files are empty in the supplied excerpts, so they are not represented as working capabilities. The README provides no further product details; the dataset relationship is based on the filename referenced by ingestion.

Main entry points: [`src/logger.py`](https://github.com/riyak0583/mlops_prediction/blob/main/src/logger.py) (Application logger), [`src/data_ingestion.py`](https://github.com/riyak0583/mlops_prediction/blob/main/src/data_ingestion.py) (Data ingestion), [`src/data_preprocessing.py`](https://github.com/riyak0583/mlops_prediction/blob/main/src/data_preprocessing.py) (Data preprocessing), [`main.py`](https://github.com/riyak0583/mlops_prediction/blob/main/main.py) (Workflow entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data workflow"]
  node_main["Workflow entry<br/>[main.py]"]
  node_dataset["Maintenance dataset"]
  node_ingest["Data ingestion<br/>[data_ingestion.py]"]
  node_prep["Data preprocessing"]
end

subgraph group_support["Observability"]
  node_logger["Application logger<br/>[logger.py]"]
end

node_console(("Console output"))
node_logfile["Rotating log file"]

node_main -->|"calls"| node_ingest
node_ingest -->|"reads"| node_dataset
node_main -->|"passes data"| node_prep
node_prep -->|"returns arrays"| node_main
node_ingest -->|"logs through"| node_logger
node_prep -->|"logs through"| node_logger
node_logger -->|"writes"| node_console
node_logger -->|"writes"| node_logfile

click node_main "https://github.com/riyak0583/mlops_prediction/blob/main/main.py"
click node_dataset "https://github.com/riyak0583/mlops_prediction/blob/main/data/raw/preventative_maintainance_dataset.csv.dvc"
click node_ingest "https://github.com/riyak0583/mlops_prediction/blob/main/src/data_ingestion.py"
click node_prep "https://github.com/riyak0583/mlops_prediction/blob/main/src/data_preprocessing.py"
click node_logger "https://github.com/riyak0583/mlops_prediction/blob/main/src/logger.py"
click node_logfile "https://github.com/riyak0583/mlops_prediction/tree/main/logs"

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_main,node_dataset,node_ingest,node_prep toneBlue
class node_logger toneAmber
class node_console toneIndigo
class node_logfile toneTeal
```

## Components

### Data workflow

- [Workflow entry](https://github.com/riyak0583/mlops_prediction/blob/main/main.py): `main.py`
- [Maintenance dataset](https://github.com/riyak0583/mlops_prediction/blob/main/data/raw/preventative_maintainance_dataset.csv.dvc): `data/raw/preventative_maintainance_dataset.csv.dvc`
- [Data ingestion](https://github.com/riyak0583/mlops_prediction/blob/main/src/data_ingestion.py): `src/data_ingestion.py`
- [Data preprocessing](https://github.com/riyak0583/mlops_prediction/blob/main/src/data_preprocessing.py): `src/data_preprocessing.py`

### Observability

- [Application logger](https://github.com/riyak0583/mlops_prediction/blob/main/src/logger.py): `src/logger.py`

### Other components

- **Console output**
- [Rotating log file](https://github.com/riyak0583/mlops_prediction/tree/main/logs): `logs`

## Connections

- Workflow entry → Data ingestion: calls (evidence: `main.py`)
- Data ingestion → Maintenance dataset: reads (evidence: `src/data_ingestion.py`)
- Workflow entry → Data preprocessing: passes data (evidence: `main.py`)
- Data preprocessing → Workflow entry: returns arrays (evidence: `main.py`)
- Data ingestion → Application logger: logs through (evidence: `src/data_ingestion.py`)
- Data preprocessing → Application logger: logs through (evidence: `src/data_preprocessing.py`)
- Application logger → Console output: writes (evidence: `src/logger.py`)
- Application logger → Rotating log file: writes (evidence: `src/logger.py`)
