# devendra-5470/mlops-118 architecture

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

- Interactive diagram: https://gitdiagram.com/devendra-5470/mlops-118
- Repository: https://github.com/devendra-5470/mlops-118

## Overview

This is a house-price prediction application with a batch data-preparation and model-training workflow, followed by an HTTP prediction service and a small web interface. Cleaning uploads versioned CSV data to S3; training reads a processed CSV, evaluates a random-forest model, and logs parameters, metrics, and the model to MLflow. The service loads the champion model, validates prediction inputs, and serves results. Source excerpts show these interactions; the README is empty, so broader capabilities are not documented.

Main entry points: [`serve.py`](https://github.com/devendra-5470/mlops-118/blob/main/serve.py) (FastAPI service), [`train.py`](https://github.com/devendra-5470/mlops-118/blob/main/train.py) (Random forest training), [`data-clean-versioning.py`](https://github.com/devendra-5470/mlops-118/blob/main/data-clean-versioning.py) (CSV cleaning), [`static/index.html`](https://github.com/devendra-5470/mlops-118/blob/main/static/index.html) (Prediction page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_raw_csv["Raw house CSV"]
  node_cleaner["CSV cleaning"]
  node_s3[("Processed data store")]
end

subgraph group_training["Model training"]
  node_trainer["Random forest training<br/>[train.py]"]
  node_mlflow["MLflow tracking"]
  node_registry[("Champion model")]
end

subgraph group_serving["Prediction service"]
  node_api["FastAPI service<br/>[serve.py]"]
  node_validation["Feature validation<br/>[serve.py]"]
  node_inference["Price inference<br/>[serve.py]"]
end

subgraph group_web["Web interface"]
  node_web_page["Prediction page<br/>[index.html]"]
  node_web_style["Page styling<br/>[style.css]"]
end

node_operator(("Data operator"))
node_client(("Prediction client"))

node_operator -->|"provides"| node_raw_csv
node_cleaner -->|"reads"| node_raw_csv
node_cleaner -->|"uploads"| node_s3
node_trainer -->|"fetches"| node_s3
node_trainer -->|"logs run"| node_mlflow
node_trainer -->|"logs model"| node_registry
node_api -->|"loads champion"| node_registry
node_client -.->|"requests prediction"| node_api
node_api -->|"validates input"| node_validation
node_api -->|"invokes model"| node_inference
node_api -->|"serves page"| node_web_page
node_api -->|"mounts static files"| node_web_style

click node_cleaner "https://github.com/devendra-5470/mlops-118/blob/main/data-clean-versioning.py"
click node_trainer "https://github.com/devendra-5470/mlops-118/blob/main/train.py"
click node_api "https://github.com/devendra-5470/mlops-118/blob/main/serve.py"
click node_validation "https://github.com/devendra-5470/mlops-118/blob/main/serve.py"
click node_inference "https://github.com/devendra-5470/mlops-118/blob/main/serve.py"
click node_web_page "https://github.com/devendra-5470/mlops-118/blob/main/static/index.html"
click node_web_style "https://github.com/devendra-5470/mlops-118/blob/main/static/style.css"

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_raw_csv,node_cleaner,node_s3,node_client toneBlue
class node_trainer,node_mlflow,node_registry toneAmber
class node_api,node_validation,node_inference toneMint
class node_web_page,node_web_style toneRose
class node_operator toneIndigo
```

## Components

### Data preparation

- **Raw house CSV**
- [CSV cleaning](https://github.com/devendra-5470/mlops-118/blob/main/data-clean-versioning.py): `data-clean-versioning.py`
- **Processed data store**

### Model training

- [Random forest training](https://github.com/devendra-5470/mlops-118/blob/main/train.py): `train.py`
- **MLflow tracking**
- **Champion model**

### Prediction service

- [FastAPI service](https://github.com/devendra-5470/mlops-118/blob/main/serve.py): `serve.py`
- [Feature validation](https://github.com/devendra-5470/mlops-118/blob/main/serve.py): `serve.py`
- [Price inference](https://github.com/devendra-5470/mlops-118/blob/main/serve.py): `serve.py`

### Web interface

- [Prediction page](https://github.com/devendra-5470/mlops-118/blob/main/static/index.html): `static/index.html`
- [Page styling](https://github.com/devendra-5470/mlops-118/blob/main/static/style.css): `static/style.css`

### Other components

- **Data operator**
- **Prediction client**

## Connections

- Data operator → Raw house CSV: provides
- CSV cleaning → Raw house CSV: reads (evidence: `data-clean-versioning.py`)
- CSV cleaning → Processed data store: uploads (evidence: `data-clean-versioning.py`)
- Random forest training → Processed data store: fetches (evidence: `train.py`)
- Random forest training → MLflow tracking: logs run (evidence: `train.py`)
- Random forest training → Champion model: logs model (evidence: `train.py`)
- FastAPI service → Champion model: loads champion (evidence: `serve.py`)
- Prediction client → FastAPI service: requests prediction
- FastAPI service → Feature validation: validates input (evidence: `serve.py`)
- FastAPI service → Price inference: invokes model (evidence: `serve.py`)
- FastAPI service → Prediction page: serves page (evidence: `serve.py`)
- FastAPI service → Page styling: mounts static files (evidence: `serve.py`)
