# anmolghost6789/modelguard-ai architecture

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

- Interactive diagram: https://gitdiagram.com/anmolghost6789/modelguard-ai
- Repository: https://github.com/anmolghost6789/modelguard-ai

## Overview

ModelGuard-AI is a research system for label-free prediction of tabular model failures from quality, distribution-shift, and uncertainty telemetry. Users explore benchmark or uploaded data in the dashboard; the core framework builds telemetry and estimates risk, while batch experiments evaluate detectors across datasets and produce research results. The repository also documents a serial preprocessing, telemetry-extraction, experiment, and figure-generation workflow. Edges reflect excerpted calls, indexed module references, or README statements; unsampled pipeline internals are not inferred.

Main entry points: [`04_Experiments/run_batch_experiments.py`](https://github.com/anmolghost6789/modelguard-ai/blob/main/04_Experiments/run_batch_experiments.py) (Batch experiments), [`03_Source_Code/src/failure_framework.py`](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/failure_framework.py) (Failure framework), [`03_Source_Code/dashboard/dashboard_app.py`](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/dashboard/dashboard_app.py) (Interactive dashboard), [`03_Source_Code/src/data_pipeline.py`](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_pipeline.py) (Ingestion and splits)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_raw_data[("Benchmark datasets")]
  node_prepared_data[("Processed splits")]
  node_ingestion["Ingestion and splits<br/>[data_pipeline.py]"]
  node_profiler["Dataset profiling<br/>[data_profiler.py]"]
end

subgraph group_signals["Telemetry signals"]
  node_quality["Quality telemetry<br/>[data_quality.py]"]
  node_drift["Shift detection<br/>[drift_detector.py]"]
  node_uncertainty["Prediction uncertainty<br/>[uncertainty.py]"]
  node_stress["Stress generation<br/>[stress_engine.py]"]
end

subgraph group_prediction["Failure prediction"]
  node_baselines["Literature baselines"]
  node_framework["Failure framework"]
end

subgraph group_product["User and research workflows"]
  node_dashboard["Interactive dashboard<br/>[dashboard_app.py]"]
  node_batch["Batch experiments"]
  node_serial_pipeline["Research pipeline"]
  node_models[("Saved models")]
  node_results[("Experiment results")]
end

node_operator(("Researcher"))

node_operator -->|"explores"| node_dashboard
node_operator -->|"runs"| node_batch
node_raw_data -.->|"loads"| node_ingestion
node_ingestion -.->|"exports splits"| node_prepared_data
node_dashboard -->|"uses"| node_ingestion
node_dashboard -->|"uses"| node_profiler
node_dashboard -->|"uses"| node_quality
node_dashboard -->|"uses"| node_drift
node_dashboard -->|"uses"| node_framework
node_dashboard -->|"uses"| node_stress
node_framework -->|"uses"| node_ingestion
node_framework -->|"computes"| node_quality
node_framework -->|"measures"| node_drift
node_framework -->|"scores"| node_baselines
node_framework -->|"uses"| node_stress
node_framework -->|"summarizes"| node_uncertainty
node_batch -->|"loads datasets"| node_ingestion
node_batch -->|"uses"| node_quality
node_batch -->|"uses"| node_drift
node_batch -->|"benchmarks"| node_baselines
node_batch -->|"evaluates"| node_framework
node_batch -->|"uses"| node_stress
node_batch -->|"uses"| node_uncertainty
node_batch -->|"writes"| node_results
node_serial_pipeline -.->|"prepares"| node_prepared_data
node_serial_pipeline -.->|"generates"| node_results
node_batch -.->|"saves models"| node_models

click node_raw_data "https://github.com/anmolghost6789/modelguard-ai/tree/main/01_Raw_Datasets"
click node_prepared_data "https://github.com/anmolghost6789/modelguard-ai/tree/main/02_Processed_Datasets"
click node_ingestion "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_pipeline.py"
click node_profiler "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_profiler.py"
click node_quality "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_quality.py"
click node_drift "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/drift_detector.py"
click node_uncertainty "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/uncertainty.py"
click node_stress "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/stress_engine.py"
click node_baselines "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/failure_baselines.py"
click node_framework "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/failure_framework.py"
click node_dashboard "https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/dashboard/dashboard_app.py"
click node_batch "https://github.com/anmolghost6789/modelguard-ai/blob/main/04_Experiments/run_batch_experiments.py"
click node_serial_pipeline "https://github.com/anmolghost6789/modelguard-ai/tree/main/03_Source_Code/pipeline"
click node_models "https://github.com/anmolghost6789/modelguard-ai/tree/main/04_Experiments/saved_models"
click node_results "https://github.com/anmolghost6789/modelguard-ai/tree/main/05_Results"

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_raw_data,node_prepared_data,node_ingestion,node_profiler toneBlue
class node_quality,node_drift,node_uncertainty,node_stress toneAmber
class node_baselines,node_framework toneMint
class node_dashboard,node_batch,node_serial_pipeline,node_models,node_results toneRose
class node_operator toneIndigo
```

## Components

### Data preparation

- [Benchmark datasets](https://github.com/anmolghost6789/modelguard-ai/tree/main/01_Raw_Datasets): `01_Raw_Datasets`
- [Processed splits](https://github.com/anmolghost6789/modelguard-ai/tree/main/02_Processed_Datasets): `02_Processed_Datasets`
- [Ingestion and splits](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_pipeline.py): `03_Source_Code/src/data_pipeline.py`
- [Dataset profiling](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_profiler.py): `03_Source_Code/src/data_profiler.py`

### Telemetry signals

- [Quality telemetry](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/data_quality.py): `03_Source_Code/src/data_quality.py`
- [Shift detection](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/drift_detector.py): `03_Source_Code/src/drift_detector.py`
- [Prediction uncertainty](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/uncertainty.py): `03_Source_Code/src/uncertainty.py`
- [Stress generation](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/stress_engine.py): `03_Source_Code/src/stress_engine.py`

### Failure prediction

- [Literature baselines](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/failure_baselines.py): `03_Source_Code/src/failure_baselines.py`
- [Failure framework](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/src/failure_framework.py): `03_Source_Code/src/failure_framework.py`

### User and research workflows

- [Interactive dashboard](https://github.com/anmolghost6789/modelguard-ai/blob/main/03_Source_Code/dashboard/dashboard_app.py): `03_Source_Code/dashboard/dashboard_app.py`
- [Batch experiments](https://github.com/anmolghost6789/modelguard-ai/blob/main/04_Experiments/run_batch_experiments.py): `04_Experiments/run_batch_experiments.py`
- [Research pipeline](https://github.com/anmolghost6789/modelguard-ai/tree/main/03_Source_Code/pipeline): `03_Source_Code/pipeline`
- [Saved models](https://github.com/anmolghost6789/modelguard-ai/tree/main/04_Experiments/saved_models): `04_Experiments/saved_models`
- [Experiment results](https://github.com/anmolghost6789/modelguard-ai/tree/main/05_Results): `05_Results`

### Other components

- **Researcher**

## Connections

- Researcher → Interactive dashboard: explores (evidence: `README.md`)
- Researcher → Batch experiments: runs (evidence: `README.md`)
- Benchmark datasets → Ingestion and splits: loads
- Ingestion and splits → Processed splits: exports splits
- Interactive dashboard → Ingestion and splits: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Interactive dashboard → Dataset profiling: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Interactive dashboard → Quality telemetry: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Interactive dashboard → Shift detection: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Interactive dashboard → Failure framework: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Interactive dashboard → Stress generation: uses (evidence: `03_Source_Code/dashboard/dashboard_app.py`)
- Failure framework → Ingestion and splits: uses (evidence: `03_Source_Code/src/failure_framework.py`)
- Failure framework → Quality telemetry: computes (evidence: `03_Source_Code/src/failure_framework.py`)
- Failure framework → Shift detection: measures (evidence: `03_Source_Code/src/failure_framework.py`)
- Failure framework → Literature baselines: scores (evidence: `03_Source_Code/src/failure_framework.py`)
- Failure framework → Stress generation: uses (evidence: `03_Source_Code/src/failure_framework.py`)
- Failure framework → Prediction uncertainty: summarizes (evidence: `03_Source_Code/src/failure_framework.py`)
- Batch experiments → Ingestion and splits: loads datasets (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Quality telemetry: uses (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Shift detection: uses (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Literature baselines: benchmarks (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Failure framework: evaluates (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Stress generation: uses (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Prediction uncertainty: uses (evidence: `04_Experiments/run_batch_experiments.py`)
- Batch experiments → Experiment results: writes (evidence: `04_Experiments/run_batch_experiments.py`)
- Research pipeline → Processed splits: prepares (evidence: `README.md`)
- Research pipeline → Experiment results: generates (evidence: `README.md`)
- Batch experiments → Saved models: saves models
