# ov2294/student_performance_mlops architecture

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

- Interactive diagram: https://gitdiagram.com/ov2294/student_performance_mlops
- Repository: https://github.com/ov2294/student_performance_mlops

## Overview

This is a student pass/fail prediction product with a reproducible model lifecycle, model serving, a Streamlit dashboard, experiment tracking, and drift monitoring. The principal workflow generates student data, prepares training and reference data, trains and selects a model, checks its quality, and monitors drift; the resulting model is served through FastAPI and the dashboard. The graph follows the README’s documented DVC stage order and sampled source for runtime reads and writes. Jenkins CI/CD and deployment tooling are omitted; unsampled deployment internals are not inferred.

Main entry points: [`src/train.py`](https://github.com/ov2294/student_performance_mlops/blob/main/src/train.py) (Model training), [`app.py`](https://github.com/ov2294/student_performance_mlops/blob/main/app.py) (Streamlit dashboard), [`dvc.yaml`](https://github.com/ov2294/student_performance_mlops/blob/main/dvc.yaml) (DVC pipeline), [`src/preprocess.py`](https://github.com/ov2294/student_performance_mlops/blob/main/src/preprocess.py) (Data preparation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Model lifecycle"]
  node_dvc["DVC pipeline<br/>[dvc.yaml]"]
  node_generator["Data generation<br/>[generate_data.py]"]
  node_rawdata["Raw student data"]
  node_preprocess["Data preparation<br/>[preprocess.py]"]
  node_prepared["Prepared datasets"]
  node_trainer["Model training<br/>[train.py]"]
  node_featurepipe["Feature pipeline<br/>[pipeline.py]"]
  node_model["Champion model"]
  node_metrics["Model metrics"]
  node_qualitygate["Quality gate<br/>[evaluate.py]"]
  node_mlflow[("MLflow tracking")]
end

subgraph group_serving["Prediction serving"]
  node_api["FastAPI service<br/>[api.py]"]
  node_predictor["Shared inference<br/>[predictor.py]"]
end

subgraph group_monitoring["Monitoring"]
  node_reference["Drift reference"]
  node_monitor["Drift monitor<br/>[monitor.py]"]
  node_driftreport["Drift report"]
  node_predictionlog["Prediction log"]
end

subgraph group_interfaces["User interfaces"]
  node_dashboard["Streamlit dashboard<br/>[app.py]"]
end

node_apiuser(("API consumer"))
node_dashboarduser(("Dashboard user"))

node_dvc -->|"dispatches"| node_generator
node_dvc -->|"dispatches"| node_preprocess
node_dvc -->|"dispatches"| node_trainer
node_dvc -->|"dispatches"| node_qualitygate
node_dvc -->|"dispatches"| node_monitor
node_generator -->|"writes"| node_rawdata
node_preprocess -->|"reads"| node_rawdata
node_preprocess -->|"writes"| node_prepared
node_preprocess -->|"writes"| node_reference
node_trainer -->|"reads"| node_prepared
node_trainer -->|"builds"| node_featurepipe
node_trainer -->|"writes"| node_model
node_trainer -->|"writes"| node_metrics
node_trainer -->|"logs runs"| node_mlflow
node_trainer -.->|"registers model"| node_mlflow
node_qualitygate -->|"reads"| node_metrics
node_monitor -->|"reads"| node_reference
node_monitor -->|"reads"| node_predictionlog
node_monitor -->|"writes"| node_driftreport
node_apiuser -->|"requests predictions"| node_api
node_api -->|"calls"| node_predictor
node_predictor -->|"loads"| node_model
node_predictor -->|"appends"| node_predictionlog
node_dashboarduser -->|"uses"| node_dashboard
node_dashboard -->|"calls"| node_predictor
node_dashboard -->|"reads"| node_metrics
node_dashboard -->|"reads"| node_driftreport
node_dashboard -->|"reads"| node_predictionlog
node_dashboard -->|"queries runs"| node_mlflow

click node_dvc "https://github.com/ov2294/student_performance_mlops/blob/main/dvc.yaml"
click node_generator "https://github.com/ov2294/student_performance_mlops/blob/main/src/generate_data.py"
click node_preprocess "https://github.com/ov2294/student_performance_mlops/blob/main/src/preprocess.py"
click node_trainer "https://github.com/ov2294/student_performance_mlops/blob/main/src/train.py"
click node_featurepipe "https://github.com/ov2294/student_performance_mlops/blob/main/src/pipeline.py"
click node_qualitygate "https://github.com/ov2294/student_performance_mlops/blob/main/src/evaluate.py"
click node_monitor "https://github.com/ov2294/student_performance_mlops/blob/main/src/monitor.py"
click node_api "https://github.com/ov2294/student_performance_mlops/blob/main/src/api.py"
click node_predictor "https://github.com/ov2294/student_performance_mlops/blob/main/src/predictor.py"
click node_dashboard "https://github.com/ov2294/student_performance_mlops/blob/main/app.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_dvc,node_generator,node_rawdata,node_preprocess,node_prepared,node_trainer,node_featurepipe,node_model,node_metrics,node_qualitygate,node_mlflow,node_dashboarduser toneBlue
class node_api,node_predictor toneAmber
class node_reference,node_monitor,node_driftreport,node_predictionlog,node_apiuser toneMint
class node_dashboard toneRose
```

## Components

### Model lifecycle

- [DVC pipeline](https://github.com/ov2294/student_performance_mlops/blob/main/dvc.yaml): `dvc.yaml`
- [Data generation](https://github.com/ov2294/student_performance_mlops/blob/main/src/generate_data.py): `src/generate_data.py`
- **Raw student data**
- [Data preparation](https://github.com/ov2294/student_performance_mlops/blob/main/src/preprocess.py): `src/preprocess.py`
- **Prepared datasets**
- [Model training](https://github.com/ov2294/student_performance_mlops/blob/main/src/train.py): `src/train.py`
- [Feature pipeline](https://github.com/ov2294/student_performance_mlops/blob/main/src/pipeline.py): `src/pipeline.py`
- **Champion model**
- **Model metrics**
- [Quality gate](https://github.com/ov2294/student_performance_mlops/blob/main/src/evaluate.py): `src/evaluate.py`
- **MLflow tracking**

### Prediction serving

- [FastAPI service](https://github.com/ov2294/student_performance_mlops/blob/main/src/api.py): `src/api.py`
- [Shared inference](https://github.com/ov2294/student_performance_mlops/blob/main/src/predictor.py): `src/predictor.py`

### Monitoring

- **Drift reference**
- [Drift monitor](https://github.com/ov2294/student_performance_mlops/blob/main/src/monitor.py): `src/monitor.py`
- **Drift report**
- **Prediction log**

### User interfaces

- [Streamlit dashboard](https://github.com/ov2294/student_performance_mlops/blob/main/app.py): `app.py`

### Other components

- **API consumer**
- **Dashboard user**

## Connections

- DVC pipeline → Data generation: dispatches
- DVC pipeline → Data preparation: dispatches
- DVC pipeline → Model training: dispatches
- DVC pipeline → Quality gate: dispatches
- DVC pipeline → Drift monitor: dispatches
- Data generation → Raw student data: writes
- Data preparation → Raw student data: reads
- Data preparation → Prepared datasets: writes
- Data preparation → Drift reference: writes
- Model training → Prepared datasets: reads
- Model training → Feature pipeline: builds
- Model training → Champion model: writes
- Model training → Model metrics: writes
- Model training → MLflow tracking: logs runs
- Model training → MLflow tracking: registers model
- Quality gate → Model metrics: reads
- Drift monitor → Drift reference: reads
- Drift monitor → Prediction log: reads
- Drift monitor → Drift report: writes
- API consumer → FastAPI service: requests predictions
- FastAPI service → Shared inference: calls
- Shared inference → Champion model: loads
- Shared inference → Prediction log: appends
- Dashboard user → Streamlit dashboard: uses
- Streamlit dashboard → Shared inference: calls
- Streamlit dashboard → Model metrics: reads
- Streamlit dashboard → Drift report: reads
- Streamlit dashboard → Prediction log: reads
- Streamlit dashboard → MLflow tracking: queries runs
