# gautham2529/drifto architecture

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

- Interactive diagram: https://gitdiagram.com/gautham2529/drifto
- Repository: https://github.com/gautham2529/drifto

## Overview

Drifto is an educational model-monitoring demo: its Streamlit app runs an interactive train/evaluate, simulate, drift-score, and inspect workflow, while src/train.py, src/simulate.py, and src/monitor.py provide a separate artefact-based command-line workflow. The app excerpt shows its own dataset, simulation, and drift logic; it does not establish calls to those command-line modules. README descriptions help preserve dashboard capabilities, but some paths between dashboard stages are documented rather than shown in the sampled app excerpt.

Main entry points: [`outputs`](https://github.com/gautham2529/drifto/tree/main/outputs) (Pipeline outputs), [`src/simulate.py`](https://github.com/gautham2529/drifto/blob/main/src/simulate.py) (Data simulation), [`src/train.py`](https://github.com/gautham2529/drifto/blob/main/src/train.py) (Model training), [`src/monitor.py`](https://github.com/gautham2529/drifto/blob/main/src/monitor.py) (Drift reporting)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Interactive dashboard"]
  node_dashboard_app["Streamlit dashboard<br/>[app.py]"]
  node_dataset_load["Dataset selection<br/>[app.py]"]
  node_model_eval["Model evaluation<br/>[app.py]"]
  node_data_sim["Production simulation<br/>[app.py]"]
  node_drift_analysis["Drift analysis<br/>[app.py]"]
  node_result_views["Monitoring views<br/>[app.py]"]
end

subgraph group_pipeline["Artefact pipeline"]
  node_dataset_source["Dataset loading<br/>[data.py]"]
  node_training["Model training<br/>[train.py]"]
  node_simulation["Data simulation<br/>[simulate.py]"]
  node_monitor["Drift reporting<br/>[monitor.py]"]
end

subgraph group_storage["Saved artefacts"]
  node_model_store[("Model artefact")]
  node_output_store[("Pipeline outputs")]
end

subgraph group_shared["Shared helpers"]
  node_helpers["Path and JSON helpers<br/>[utils.py]"]
end

node_user(("Dashboard user"))

node_user -->|"uses"| node_dashboard_app
node_dashboard_app -->|"loads data"| node_dataset_load
node_dashboard_app -->|"imports"| node_dataset_source
node_dataset_load -.->|"provides data"| node_model_eval
node_model_eval -->|"provides reference"| node_data_sim
node_data_sim -->|"compares data"| node_drift_analysis
node_drift_analysis -.->|"shows results"| node_result_views
node_dataset_source -->|"loads dataset"| node_training
node_training -->|"saves model"| node_model_store
node_training -->|"saves baseline"| node_output_store
node_training -->|"uses helpers"| node_helpers
node_simulation -->|"loads model"| node_model_store
node_simulation -->|"reads reference"| node_output_store
node_simulation -->|"writes simulated data"| node_output_store
node_simulation -->|"uses helpers"| node_helpers
node_monitor -->|"reads inputs"| node_output_store
node_monitor -->|"writes reports"| node_output_store
node_monitor -->|"uses helpers"| node_helpers

click node_dashboard_app "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_dataset_load "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_model_eval "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_data_sim "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_drift_analysis "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_result_views "https://github.com/gautham2529/drifto/blob/main/app.py"
click node_dataset_source "https://github.com/gautham2529/drifto/blob/main/src/data.py"
click node_training "https://github.com/gautham2529/drifto/blob/main/src/train.py"
click node_simulation "https://github.com/gautham2529/drifto/blob/main/src/simulate.py"
click node_monitor "https://github.com/gautham2529/drifto/blob/main/src/monitor.py"
click node_model_store "https://github.com/gautham2529/drifto/tree/main/models"
click node_output_store "https://github.com/gautham2529/drifto/tree/main/outputs"
click node_helpers "https://github.com/gautham2529/drifto/blob/main/src/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_dashboard_app,node_dataset_load,node_model_eval,node_data_sim,node_drift_analysis,node_result_views,node_user toneBlue
class node_dataset_source,node_training,node_simulation,node_monitor toneAmber
class node_model_store,node_output_store toneMint
class node_helpers toneRose
```

## Components

### Interactive dashboard

- [Streamlit dashboard](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`
- [Dataset selection](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`
- [Model evaluation](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`
- [Production simulation](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`
- [Drift analysis](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`
- [Monitoring views](https://github.com/gautham2529/drifto/blob/main/app.py): `app.py`

### Artefact pipeline

- [Dataset loading](https://github.com/gautham2529/drifto/blob/main/src/data.py): `src/data.py`
- [Model training](https://github.com/gautham2529/drifto/blob/main/src/train.py): `src/train.py`
- [Data simulation](https://github.com/gautham2529/drifto/blob/main/src/simulate.py): `src/simulate.py`
- [Drift reporting](https://github.com/gautham2529/drifto/blob/main/src/monitor.py): `src/monitor.py`

### Saved artefacts

- [Model artefact](https://github.com/gautham2529/drifto/tree/main/models): `models`
- [Pipeline outputs](https://github.com/gautham2529/drifto/tree/main/outputs): `outputs`

### Shared helpers

- [Path and JSON helpers](https://github.com/gautham2529/drifto/blob/main/src/utils.py): `src/utils.py`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → Streamlit dashboard: uses (evidence: `README.md`)
- Streamlit dashboard → Dataset selection: loads data (evidence: `app.py`)
- Streamlit dashboard → Dataset loading: imports (evidence: `app.py`)
- Dataset selection → Model evaluation: provides data (evidence: `README.md`)
- Model evaluation → Production simulation: provides reference (evidence: `app.py`)
- Production simulation → Drift analysis: compares data (evidence: `app.py`)
- Drift analysis → Monitoring views: shows results (evidence: `README.md`)
- Dataset loading → Model training: loads dataset (evidence: `src/train.py`)
- Model training → Model artefact: saves model (evidence: `src/train.py`)
- Model training → Pipeline outputs: saves baseline (evidence: `src/train.py`)
- Model training → Path and JSON helpers: uses helpers (evidence: `src/train.py`)
- Data simulation → Model artefact: loads model (evidence: `src/simulate.py`)
- Data simulation → Pipeline outputs: reads reference (evidence: `src/simulate.py`)
- Data simulation → Pipeline outputs: writes simulated data (evidence: `src/simulate.py`)
- Data simulation → Path and JSON helpers: uses helpers (evidence: `src/simulate.py`)
- Drift reporting → Pipeline outputs: reads inputs (evidence: `src/monitor.py`)
- Drift reporting → Pipeline outputs: writes reports (evidence: `src/monitor.py`)
- Drift reporting → Path and JSON helpers: uses helpers (evidence: `src/monitor.py`)
