# vikashishere/yt-mlops-proj1 architecture

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

- Interactive diagram: https://gitdiagram.com/vikashishere/yt-mlops-proj1
- Repository: https://github.com/vikashishere/yt-mlops-proj1

## Overview

This is an end-to-end vehicle-insurance MLOps application. Training starts from the web app or training entry point, ingests MongoDB data, validates and transforms it, trains and evaluates a model, then pushes an accepted model to S3. Prediction converts submitted vehicle fields into a dataframe and loads the model from S3. The graph preserves the documented web/API and AWS capabilities; several component links rely on the SOURCE INDEX or README because their implementations were not excerpted.

Main entry points: [`src/pipline/training_pipeline.py`](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/training_pipeline.py) (Training orchestrator), [`src/entity/s3_estimator.py`](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/s3_estimator.py) (S3 model estimator), [`app.py`](https://github.com/vikashishere/yt-mlops-proj1/blob/main/app.py) (Web/API app), [`src/components/model_trainer.py`](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_trainer.py) (Model trainer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Web/API app<br/>[app.py]"]
end

subgraph group_training["Training workflow"]
  node_trainpipe["Training orchestrator"]
  node_ingest["Data ingestion<br/>[data_ingestion.py]"]
  node_validate["Data validation<br/>[data_validation.py]"]
  node_transform["Data transformation"]
  node_trainer["Model trainer<br/>[model_trainer.py]"]
  node_evaluate["Model evaluation"]
  node_pusher["Model pusher<br/>[model_pusher.py]"]
end

subgraph group_model["Model serving"]
  node_prediction["Prediction pipeline"]
  node_vehicledata["Vehicle input"]
  node_estimator["S3 model estimator<br/>[s3_estimator.py]"]
  node_estimatorcore["Model estimator<br/>[estimator.py]"]
end

subgraph group_integrations["Data and cloud integrations"]
  node_mongoaccess["Mongo data access<br/>[proj1_data.py]"]
  node_mongoconfig["Mongo connection"]
  node_mongodb[("MongoDB")]
  node_storage["S3 storage service<br/>[aws_storage.py]"]
  node_aws[("AWS S3")]
end

subgraph group_support["Pipeline contracts"]
  node_artifacts["Pipeline artifacts<br/>[artifact_entity.py]"]
  node_config["Pipeline configuration<br/>[config_entity.py]"]
  node_utils["File and YAML utilities<br/>[main_utils.py]"]
end

node_user(("User"))

node_user -->|"submits data"| node_app
node_app -->|"starts training"| node_trainpipe
node_app -->|"routes prediction"| node_prediction
node_trainpipe -->|"runs ingestion"| node_ingest
node_trainpipe -->|"runs validation"| node_validate
node_trainpipe -->|"runs transformation"| node_transform
node_trainpipe -->|"runs training"| node_trainer
node_trainpipe -->|"runs evaluation"| node_evaluate
node_trainpipe -->|"runs pushing"| node_pusher
node_ingest -->|"fetches records"| node_mongoaccess
node_mongoaccess -->|"uses connection"| node_mongoconfig
node_mongoconfig -->|"connects to"| node_mongodb
node_transform -->|"uses utilities"| node_utils
node_trainer -->|"uses utilities"| node_utils
node_trainer -->|"builds model"| node_estimatorcore
node_evaluate -->|"compares model"| node_estimator
node_pusher -->|"uploads model"| node_storage
node_pusher -->|"uses estimator"| node_estimator
node_estimator -->|"loads or saves"| node_storage
node_storage -->|"reads and writes"| node_aws
node_prediction -->|"accepts vehicle fields"| node_vehicledata
node_prediction -->|"requests prediction"| node_estimator
node_estimator -->|"predicts with"| node_estimatorcore
node_trainpipe -->|"passes stage results"| node_artifacts
node_trainpipe -->|"configures stages"| node_config

click node_app "https://github.com/vikashishere/yt-mlops-proj1/blob/main/app.py"
click node_trainpipe "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/training_pipeline.py"
click node_ingest "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_ingestion.py"
click node_validate "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_validation.py"
click node_transform "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_transformation.py"
click node_trainer "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_trainer.py"
click node_evaluate "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_evaluation.py"
click node_pusher "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_pusher.py"
click node_prediction "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/prediction_pipeline.py"
click node_vehicledata "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/prediction_pipeline.py"
click node_estimator "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/s3_estimator.py"
click node_estimatorcore "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/estimator.py"
click node_mongoaccess "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/data_access/proj1_data.py"
click node_mongoconfig "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/configuration/mongo_db_connection.py"
click node_storage "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/cloud_storage/aws_storage.py"
click node_artifacts "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/artifact_entity.py"
click node_config "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/config_entity.py"
click node_utils "https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/utils/main_utils.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_app,node_user toneBlue
class node_trainpipe,node_ingest,node_validate,node_transform,node_trainer,node_evaluate,node_pusher toneAmber
class node_prediction,node_vehicledata,node_estimator,node_estimatorcore toneMint
class node_mongoaccess,node_mongoconfig,node_mongodb,node_storage,node_aws toneRose
class node_artifacts,node_config,node_utils toneIndigo
```

## Components

### Application entry

- [Web/API app](https://github.com/vikashishere/yt-mlops-proj1/blob/main/app.py): `app.py`

### Training workflow

- [Training orchestrator](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/training_pipeline.py): `src/pipline/training_pipeline.py`
- [Data ingestion](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_ingestion.py): `src/components/data_ingestion.py`
- [Data validation](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_validation.py): `src/components/data_validation.py`
- [Data transformation](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/data_transformation.py): `src/components/data_transformation.py`
- [Model trainer](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_trainer.py): `src/components/model_trainer.py`
- [Model evaluation](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_evaluation.py): `src/components/model_evaluation.py`
- [Model pusher](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/components/model_pusher.py): `src/components/model_pusher.py`

### Model serving

- [Prediction pipeline](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/prediction_pipeline.py): `src/pipline/prediction_pipeline.py`
- [Vehicle input](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/pipline/prediction_pipeline.py): `src/pipline/prediction_pipeline.py`
- [S3 model estimator](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/s3_estimator.py): `src/entity/s3_estimator.py`
- [Model estimator](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/estimator.py): `src/entity/estimator.py`

### Data and cloud integrations

- [Mongo data access](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/data_access/proj1_data.py): `src/data_access/proj1_data.py`
- [Mongo connection](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/configuration/mongo_db_connection.py): `src/configuration/mongo_db_connection.py`
- **MongoDB**
- [S3 storage service](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/cloud_storage/aws_storage.py): `src/cloud_storage/aws_storage.py`
- **AWS S3**

### Pipeline contracts

- [Pipeline artifacts](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/artifact_entity.py): `src/entity/artifact_entity.py`
- [Pipeline configuration](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/entity/config_entity.py): `src/entity/config_entity.py`
- [File and YAML utilities](https://github.com/vikashishere/yt-mlops-proj1/blob/main/src/utils/main_utils.py): `src/utils/main_utils.py`

### Other components

- **User**

## Connections

- User → Web/API app: submits data (evidence: `README.md`)
- Web/API app → Training orchestrator: starts training (evidence: `app.py`)
- Web/API app → Prediction pipeline: routes prediction (evidence: `app.py`)
- Training orchestrator → Data ingestion: runs ingestion (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Data validation: runs validation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Data transformation: runs transformation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model trainer: runs training (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model evaluation: runs evaluation (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Model pusher: runs pushing (evidence: `src/pipline/training_pipeline.py`)
- Data ingestion → Mongo data access: fetches records (evidence: `src/components/data_ingestion.py`)
- Mongo data access → Mongo connection: uses connection (evidence: `src/data_access/proj1_data.py`)
- Mongo connection → MongoDB: connects to (evidence: `README.md`)
- Data transformation → File and YAML utilities: uses utilities (evidence: `src/components/data_transformation.py`)
- Model trainer → File and YAML utilities: uses utilities (evidence: `src/components/model_trainer.py`)
- Model trainer → Model estimator: builds model (evidence: `src/components/model_trainer.py`)
- Model evaluation → S3 model estimator: compares model (evidence: `src/components/model_evaluation.py`)
- Model pusher → S3 storage service: uploads model (evidence: `src/components/model_pusher.py`)
- Model pusher → S3 model estimator: uses estimator (evidence: `src/components/model_pusher.py`)
- S3 model estimator → S3 storage service: loads or saves (evidence: `src/entity/s3_estimator.py`)
- S3 storage service → AWS S3: reads and writes (evidence: `README.md`)
- Prediction pipeline → Vehicle input: accepts vehicle fields (evidence: `README.md`)
- Prediction pipeline → S3 model estimator: requests prediction (evidence: `src/pipline/prediction_pipeline.py`)
- S3 model estimator → Model estimator: predicts with (evidence: `src/entity/s3_estimator.py`)
- Training orchestrator → Pipeline artifacts: passes stage results (evidence: `src/pipline/training_pipeline.py`)
- Training orchestrator → Pipeline configuration: configures stages (evidence: `src/pipline/training_pipeline.py`)
