# arunpentaboyina8/ml_project architecture

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

- Interactive diagram: https://gitdiagram.com/arunpentaboyina8/ml_project
- Repository: https://github.com/arunpentaboyina8/ml_project

## Overview

This repository predicts a student’s mathematics score from demographic and reading/writing inputs. Its principal workflow is dataset ingestion and splitting, preprocessing, model comparison and serialization, then user input through either Flask or Streamlit into a shared prediction pipeline. The README also describes evaluation and both deployment interfaces. The graph reflects documented and excerpted calls; it does not infer links for unsampled deployment configuration or the empty training-pipeline module.

Main entry points: [`src/components/data_ingestion.py`](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_ingestion.py) (Data ingestion), [`src/pipeline/predict_pipeline.py`](https://github.com/arunpentaboyina8/ml_project/blob/main/src/pipeline/predict_pipeline.py) (Prediction pipeline), [`src/components/data_transformation.py`](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_transformation.py) (Feature transformation), [`src/components/model_trainer.py`](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/model_trainer.py) (Model training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Model training"]
  node_ingestion["Data ingestion<br/>[data_ingestion.py]"]
  node_dataset["Student dataset<br/>[stud.csv]"]
  node_training_data["Train/test data"]
  node_transformation["Feature transformation"]
  node_trainer["Model training<br/>[model_trainer.py]"]
  node_evaluation["Model evaluation<br/>[utils.py]"]
  node_artifacts["Fitted model artifacts"]
end

subgraph group_serving["Prediction serving"]
  node_custom_data["Input data mapping"]
  node_prediction["Prediction pipeline"]
end

subgraph group_interfaces["User interfaces"]
  node_flask["Flask interface<br/>[app.py]"]
  node_streamlit["Streamlit interface<br/>[streamlit_app.py]"]
end

subgraph group_support["Shared support"]
  node_exception["Exception handling<br/>[exception.py]"]
  node_logger["Logging<br/>[logger.py]"]
end

node_user(("Student / user"))

node_ingestion -->|"reads"| node_dataset
node_ingestion -->|"writes splits"| node_training_data
node_ingestion -->|"runs"| node_transformation
node_ingestion -->|"runs"| node_trainer
node_transformation -->|"reads"| node_training_data
node_transformation -->|"saves preprocessor"| node_artifacts
node_trainer -->|"evaluates models"| node_evaluation
node_trainer -->|"saves best model"| node_artifacts
node_flask -->|"serves forms"| node_user
node_streamlit -->|"accepts inputs"| node_user
node_user -->|"submits details"| node_flask
node_user -->|"enters details"| node_streamlit
node_flask -->|"creates input"| node_custom_data
node_streamlit -->|"creates input"| node_custom_data
node_custom_data -->|"provides dataframe"| node_prediction
node_flask -->|"invokes"| node_prediction
node_streamlit -->|"invokes"| node_prediction
node_prediction -->|"loads model and preprocessor"| node_artifacts
node_prediction -->|"returns score"| node_user
node_ingestion -->|"logs progress"| node_logger
node_transformation -->|"logs progress"| node_logger
node_trainer -->|"logs progress"| node_logger
node_ingestion -->|"raises on errors"| node_exception
node_transformation -->|"raises on errors"| node_exception
node_trainer -->|"raises on errors"| node_exception
node_prediction -->|"raises on errors"| node_exception

click node_ingestion "https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_ingestion.py"
click node_dataset "https://github.com/arunpentaboyina8/ml_project/blob/main/notebook/data/stud.csv"
click node_training_data "https://github.com/arunpentaboyina8/ml_project/tree/main/artifacts"
click node_transformation "https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/model_trainer.py"
click node_evaluation "https://github.com/arunpentaboyina8/ml_project/blob/main/src/utils.py"
click node_artifacts "https://github.com/arunpentaboyina8/ml_project/tree/main/artifacts"
click node_custom_data "https://github.com/arunpentaboyina8/ml_project/blob/main/src/pipeline/predict_pipeline.py"
click node_prediction "https://github.com/arunpentaboyina8/ml_project/blob/main/src/pipeline/predict_pipeline.py"
click node_flask "https://github.com/arunpentaboyina8/ml_project/blob/main/app.py"
click node_streamlit "https://github.com/arunpentaboyina8/ml_project/blob/main/streamlit_app.py"
click node_exception "https://github.com/arunpentaboyina8/ml_project/blob/main/src/exception.py"
click node_logger "https://github.com/arunpentaboyina8/ml_project/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_ingestion,node_dataset,node_training_data,node_transformation,node_trainer,node_evaluation,node_artifacts,node_user toneBlue
class node_custom_data,node_prediction toneAmber
class node_flask,node_streamlit toneMint
class node_exception,node_logger toneRose
```

## Components

### Model training

- [Data ingestion](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Student dataset](https://github.com/arunpentaboyina8/ml_project/blob/main/notebook/data/stud.csv): `notebook/data/stud.csv`
- [Train/test data](https://github.com/arunpentaboyina8/ml_project/tree/main/artifacts): `artifacts`
- [Feature transformation](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`
- [Model training](https://github.com/arunpentaboyina8/ml_project/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`
- [Model evaluation](https://github.com/arunpentaboyina8/ml_project/blob/main/src/utils.py): `src/utils.py`
- [Fitted model artifacts](https://github.com/arunpentaboyina8/ml_project/tree/main/artifacts): `artifacts`

### Prediction serving

- [Input data mapping](https://github.com/arunpentaboyina8/ml_project/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`
- [Prediction pipeline](https://github.com/arunpentaboyina8/ml_project/blob/main/src/pipeline/predict_pipeline.py): `src/pipeline/predict_pipeline.py`

### User interfaces

- [Flask interface](https://github.com/arunpentaboyina8/ml_project/blob/main/app.py): `app.py`
- [Streamlit interface](https://github.com/arunpentaboyina8/ml_project/blob/main/streamlit_app.py): `streamlit_app.py`

### Shared support

- [Exception handling](https://github.com/arunpentaboyina8/ml_project/blob/main/src/exception.py): `src/exception.py`
- [Logging](https://github.com/arunpentaboyina8/ml_project/blob/main/src/logger.py): `src/logger.py`

### Other components

- **Student / user**

## Connections

- Data ingestion → Student dataset: reads (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Train/test data: writes splits (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Feature transformation: runs (evidence: `src/components/data_ingestion.py`)
- Data ingestion → Model training: runs (evidence: `src/components/data_ingestion.py`)
- Feature transformation → Train/test data: reads (evidence: `src/components/data_transformation.py`)
- Feature transformation → Fitted model artifacts: saves preprocessor (evidence: `src/components/data_transformation.py`)
- Model training → Model evaluation: evaluates models (evidence: `src/components/model_trainer.py`)
- Model training → Fitted model artifacts: saves best model (evidence: `src/components/model_trainer.py`)
- Flask interface → Student / user: serves forms (evidence: `app.py`)
- Streamlit interface → Student / user: accepts inputs (evidence: `streamlit_app.py`)
- Student / user → Flask interface: submits details (evidence: `README.MD`)
- Student / user → Streamlit interface: enters details (evidence: `README.MD`)
- Flask interface → Input data mapping: creates input (evidence: `app.py`)
- Streamlit interface → Input data mapping: creates input (evidence: `streamlit_app.py`)
- Input data mapping → Prediction pipeline: provides dataframe (evidence: `app.py`)
- Flask interface → Prediction pipeline: invokes (evidence: `app.py`)
- Streamlit interface → Prediction pipeline: invokes (evidence: `streamlit_app.py`)
- Prediction pipeline → Fitted model artifacts: loads model and preprocessor (evidence: `src/pipeline/predict_pipeline.py`)
- Prediction pipeline → Student / user: returns score (evidence: `README.MD`)
- Data ingestion → Logging: logs progress (evidence: `src/components/data_ingestion.py`)
- Feature transformation → Logging: logs progress (evidence: `src/components/data_transformation.py`)
- Model training → Logging: logs progress (evidence: `src/components/model_trainer.py`)
- Data ingestion → Exception handling: raises on errors (evidence: `src/components/data_ingestion.py`)
- Feature transformation → Exception handling: raises on errors (evidence: `src/components/data_transformation.py`)
- Model training → Exception handling: raises on errors (evidence: `src/components/model_trainer.py`)
- Prediction pipeline → Exception handling: raises on errors (evidence: `src/pipeline/predict_pipeline.py`)
