# abdo-atem/ml-model-monitoring-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/abdo-atem/ml-model-monitoring-dashboard
- Repository: https://github.com/abdo-atem/ml-model-monitoring-dashboard

## Overview

This educational monitoring dashboard demonstrates a reproducible train-to-monitor workflow: train and evaluate a classifier, simulate shifted production inputs, compute and report feature drift, then inspect the saved results in Streamlit. The modules communicate primarily through persisted model and output files; the README documents the overall flow and dashboard capabilities. The dashboard excerpt is incomplete, so its artifact-reading links are supported by the README rather than inspected implementation details.

Main entry points: [`src/monitor.py`](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/monitor.py) (Feature drift scoring), [`src/train.py`](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/train.py) (Model training), [`src/simulate.py`](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/simulate.py) (Drift simulation), [`app.py`](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/app.py) (Interactive dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training"]
  node_dataset["Breast Cancer data<br/>[data.py]"]
  node_split["Train/test split<br/>[data.py]"]
  node_trainer["Model training<br/>[train.py]"]
  node_evaluation["Baseline evaluation<br/>[train.py]"]
end

subgraph group_simulation["Simulation"]
  node_simulator["Drift simulation<br/>[simulate.py]"]
end

subgraph group_monitoring["Monitoring"]
  node_drift["Feature drift scoring<br/>[monitor.py]"]
end

subgraph group_persistence["Persisted artifacts"]
  node_model["Trained model"]
  node_reference["Reference data"]
  node_baseline["Baseline metrics"]
  node_newdata["Simulated inputs"]
  node_predictions["New predictions"]
  node_driftreport["Drift report"]
  node_summary["Monitoring summary"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["Interactive dashboard<br/>[app.py]"]
end

node_engineer(("Dashboard user"))

node_trainer -->|"loads and splits"| node_dataset
node_dataset -->|"returns data"| node_split
node_trainer -->|"evaluates model"| node_evaluation
node_trainer -->|"saves model"| node_model
node_trainer -->|"saves metrics"| node_baseline
node_trainer -->|"saves test split"| node_reference
node_simulator -->|"reads reference"| node_reference
node_simulator -->|"loads model"| node_model
node_simulator -->|"saves simulated data"| node_newdata
node_simulator -->|"saves predictions"| node_predictions
node_drift -->|"reads reference"| node_reference
node_drift -->|"reads inputs"| node_newdata
node_drift -->|"reads predictions"| node_predictions
node_drift -->|"loads metrics"| node_baseline
node_drift -->|"writes report"| node_driftreport
node_drift -->|"writes summary"| node_summary
node_engineer -->|"views dashboard"| node_dashboard
node_dashboard -->|"visualizes metrics"| node_baseline
node_dashboard -->|"visualizes drift"| node_driftreport
node_dashboard -->|"visualizes summary"| node_summary

click node_dataset "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/data.py"
click node_split "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/data.py"
click node_trainer "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/train.py"
click node_evaluation "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/train.py"
click node_model "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/models"
click node_reference "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_baseline "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_simulator "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/simulate.py"
click node_newdata "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_predictions "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_drift "https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/monitor.py"
click node_driftreport "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_summary "https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs"
click node_dashboard "https://github.com/abdo-atem/ml-model-monitoring-dashboard/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_dataset,node_split,node_trainer,node_evaluation,node_engineer toneBlue
class node_simulator toneAmber
class node_drift toneMint
class node_model,node_reference,node_baseline,node_newdata,node_predictions,node_driftreport,node_summary toneRose
class node_dashboard toneIndigo
```

## Components

### Training

- [Breast Cancer data](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/data.py): `src/data.py`
- [Train/test split](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/data.py): `src/data.py`
- [Model training](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/train.py): `src/train.py`
- [Baseline evaluation](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/train.py): `src/train.py`

### Simulation

- [Drift simulation](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/simulate.py): `src/simulate.py`

### Monitoring

- [Feature drift scoring](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/src/monitor.py): `src/monitor.py`

### Persisted artifacts

- [Trained model](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/models): `models`
- [Reference data](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`
- [Baseline metrics](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`
- [Simulated inputs](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`
- [New predictions](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`
- [Drift report](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`
- [Monitoring summary](https://github.com/abdo-atem/ml-model-monitoring-dashboard/tree/main/outputs): `outputs`

### Dashboard

- [Interactive dashboard](https://github.com/abdo-atem/ml-model-monitoring-dashboard/blob/main/app.py): `app.py`

### Other components

- **Dashboard user**

## Connections

- Model training → Breast Cancer data: loads and splits (evidence: `src/train.py`)
- Breast Cancer data → Train/test split: returns data (evidence: `src/data.py`)
- Model training → Baseline evaluation: evaluates model (evidence: `src/train.py`)
- Model training → Trained model: saves model (evidence: `src/train.py`)
- Model training → Baseline metrics: saves metrics (evidence: `src/train.py`)
- Model training → Reference data: saves test split (evidence: `src/train.py`)
- Drift simulation → Reference data: reads reference (evidence: `src/simulate.py`)
- Drift simulation → Trained model: loads model (evidence: `src/simulate.py`)
- Drift simulation → Simulated inputs: saves simulated data (evidence: `src/simulate.py`)
- Drift simulation → New predictions: saves predictions (evidence: `src/simulate.py`)
- Feature drift scoring → Reference data: reads reference (evidence: `src/monitor.py`)
- Feature drift scoring → Simulated inputs: reads inputs (evidence: `src/monitor.py`)
- Feature drift scoring → New predictions: reads predictions (evidence: `src/monitor.py`)
- Feature drift scoring → Baseline metrics: loads metrics (evidence: `src/monitor.py`)
- Feature drift scoring → Drift report: writes report (evidence: `src/monitor.py`)
- Feature drift scoring → Monitoring summary: writes summary (evidence: `src/monitor.py`)
- Dashboard user → Interactive dashboard: views dashboard (evidence: `README.md`)
- Interactive dashboard → Baseline metrics: visualizes metrics (evidence: `README.md`)
- Interactive dashboard → Drift report: visualizes drift (evidence: `README.md`)
- Interactive dashboard → Monitoring summary: visualizes summary (evidence: `README.md`)
