# arefin994/mlbench-lite architecture

> Architecture diagram of the GitHub repository arefin994/mlbench-lite, 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/arefin994/mlbench-lite
- Repository: https://github.com/arefin994/mlbench-lite

## Overview

mlbench-lite is a Python library and CLI/TUI for benchmarking classification and regression models on tabular datasets. The main workflow accepts built-in or user-provided data, selects a task and models, optionally recommends or applies scaling, evaluates models by holdout or cross-validation, and returns or saves metric results. README capabilities include model discovery, GPU/deep-model options, reproducibility, and statistical comparisons. Some internals of benchmark.py and CLI/TUI handlers were not sampled; only documented or excerpt-supported connections are shown.

Main entry points: [`mlbench_lite/benchmark.py`](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/benchmark.py) (Benchmark runner), [`mlbench_lite/tui.py`](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/tui.py) (Interactive TUI), [`mlbench_lite/cli.py`](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/cli.py) (Command-line interface), [`mlbench_lite/__init__.py`](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/__init__.py) (Python API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_api["Python API<br/>[__init__.py]"]
  node_cli["Command-line interface<br/>[cli.py]"]
  node_tui["Interactive TUI<br/>[tui.py]"]
end

subgraph group_benchmarking["Benchmarking"]
  node_benchmark["Benchmark runner<br/>[benchmark.py]"]
  node_models["Model discovery<br/>[benchmark.py]"]
  node_preprocess["Scaling tools<br/>[preprocessing.py]"]
end

subgraph group_support["Data and analysis"]
  node_dataset["Clover dataset<br/>[datasets.py]"]
  node_stats["Significance tests<br/>[stats.py]"]
  node_seeding["Reproducibility<br/>[utils.py]"]
  node_result["Pandas results"]
end

subgraph group_integrations["Model integrations"]
  node_deep["Deep tabular models<br/>[deep_models.py]"]
  node_mlstack["ML estimator libraries"]
end

node_user(("Python / CLI / TUI user"))
node_input["User dataset"]
node_resultfile["CSV / JSON output"]

node_user -->|"calls"| node_api
node_user -->|"invokes"| node_cli
node_user -.->|"invokes"| node_tui
node_api -->|"exports"| node_benchmark
node_api -->|"exports"| node_dataset
node_api -->|"exports"| node_preprocess
node_api -->|"exports"| node_stats
node_api -->|"exports"| node_seeding
node_cli -->|"loads"| node_input
node_cli -->|"calls"| node_benchmark
node_cli -->|"lists"| node_models
node_cli -->|"prints"| node_result
node_cli -->|"saves"| node_resultfile
node_tui -->|"loads demo"| node_cli
node_tui -->|"calls"| node_benchmark
node_tui -->|"requests advice"| node_preprocess
node_tui -->|"lists"| node_models
node_tui -->|"displays"| node_result
node_tui -->|"saves"| node_resultfile
node_benchmark -->|"applies scaling"| node_preprocess
node_benchmark -->|"seeds"| node_seeding
node_benchmark -->|"selects"| node_models
node_benchmark -->|"evaluates with"| node_mlstack
node_benchmark -.->|"uses optional models"| node_deep
node_benchmark -->|"returns"| node_result
node_stats -->|"reads fold scores"| node_result
node_dataset -->|"provides data"| node_user

click node_api "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/__init__.py"
click node_cli "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/cli.py"
click node_tui "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/tui.py"
click node_benchmark "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/benchmark.py"
click node_models "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/benchmark.py"
click node_preprocess "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/preprocessing.py"
click node_deep "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/deep_models.py"
click node_dataset "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/datasets.py"
click node_stats "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/stats.py"
click node_seeding "https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/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_api,node_cli,node_tui,node_user,node_input toneBlue
class node_benchmark,node_models,node_preprocess toneAmber
class node_dataset,node_stats,node_seeding,node_result toneMint
class node_deep,node_mlstack toneRose
class node_resultfile toneIndigo
```

## Components

### User interfaces

- [Python API](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/__init__.py): `mlbench_lite/__init__.py`
- [Command-line interface](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/cli.py): `mlbench_lite/cli.py`
- [Interactive TUI](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/tui.py): `mlbench_lite/tui.py`

### Benchmarking

- [Benchmark runner](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/benchmark.py): `mlbench_lite/benchmark.py`
- [Model discovery](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/benchmark.py): `mlbench_lite/benchmark.py`
- [Scaling tools](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/preprocessing.py): `mlbench_lite/preprocessing.py`

### Data and analysis

- [Clover dataset](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/datasets.py): `mlbench_lite/datasets.py`
- [Significance tests](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/stats.py): `mlbench_lite/stats.py`
- [Reproducibility](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/utils.py): `mlbench_lite/utils.py`
- **Pandas results**

### Model integrations

- [Deep tabular models](https://github.com/arefin994/mlbench-lite/blob/main/mlbench_lite/deep_models.py): `mlbench_lite/deep_models.py`
- **ML estimator libraries**

### Other components

- **Python / CLI / TUI user**
- **User dataset**
- **CSV / JSON output**

## Connections

- Python / CLI / TUI user → Python API: calls
- Python / CLI / TUI user → Command-line interface: invokes
- Python / CLI / TUI user → Interactive TUI: invokes
- Python API → Benchmark runner: exports
- Python API → Clover dataset: exports
- Python API → Scaling tools: exports
- Python API → Significance tests: exports
- Python API → Reproducibility: exports
- Command-line interface → User dataset: loads
- Command-line interface → Benchmark runner: calls
- Command-line interface → Model discovery: lists
- Command-line interface → Pandas results: prints
- Command-line interface → CSV / JSON output: saves
- Interactive TUI → Command-line interface: loads demo
- Interactive TUI → Benchmark runner: calls
- Interactive TUI → Scaling tools: requests advice
- Interactive TUI → Model discovery: lists
- Interactive TUI → Pandas results: displays
- Interactive TUI → CSV / JSON output: saves
- Benchmark runner → Scaling tools: applies scaling
- Benchmark runner → Reproducibility: seeds
- Benchmark runner → Model discovery: selects
- Benchmark runner → ML estimator libraries: evaluates with
- Benchmark runner → Deep tabular models: uses optional models
- Benchmark runner → Pandas results: returns
- Significance tests → Pandas results: reads fold scores
- Clover dataset → Python / CLI / TUI user: provides data
