# deeep095/auto_ml architecture

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

- Interactive diagram: https://gitdiagram.com/deeep095/auto_ml
- Repository: https://github.com/deeep095/auto_ml

## Overview

AutoML is a Telegram-guided tabular machine-learning service. Users upload or reuse a dataset, receive a classification or regression plan, optionally customize model parameters, and get evaluated models plus visualizations, reports, and a saved best model. The documented service boundary is n8n to FastAPI; the sampled engine code shows the training pipeline’s internal stages. The n8n workflow exports and some artifact-delivery details were not sampled, so those relationships rely on README-level documentation.

Main entry points: [`ml_engine/pipeline.py`](https://github.com/deeep095/auto_ml/blob/main/ml_engine/pipeline.py) (Run coordinator), [`ml_engine/app.py`](https://github.com/deeep095/auto_ml/blob/main/ml_engine/app.py) (FastAPI routes), [`ml_engine/reports.py`](https://github.com/deeep095/auto_ml/blob/main/ml_engine/reports.py) (Reports and summaries), [`ml_engine/utils.py`](https://github.com/deeep095/auto_ml/blob/main/ml_engine/utils.py) (Artifact utilities)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_chat["Telegram workflows"]
  node_router["Chat router<br/>[main_workflow.json]"]
  node_planner["AI customizer"]
  node_workflow["Training workflow"]
end

subgraph group_service["ML service"]
  node_api["FastAPI routes<br/>[app.py]"]
  node_schemas["Plan and model schemas<br/>[app.py]"]
  node_config["Runtime configuration<br/>[config.py]"]
end

subgraph group_training["Training pipeline"]
  node_pipeline["Run coordinator<br/>[pipeline.py]"]
  node_preprocess["Dataset preparation<br/>[preprocessing.py]"]
  node_models["Model registry<br/>[models.py]"]
  node_metrics["Evaluation metrics<br/>[metrics.py]"]
end

subgraph group_outputs["Results and artifacts"]
  node_plots["Visualization generation<br/>[plots.py]"]
  node_reports["Reports and summaries<br/>[reports.py]"]
  node_utils["Artifact utilities<br/>[utils.py]"]
  node_artifacts[("Shared artifacts")]
end

node_user(("Telegram user"))
node_telegram["Telegram Bot API"]

node_user -->|"sends dataset"| node_router
node_router -.->|"requests planning"| node_planner
node_planner -.->|"customizes plan"| node_workflow
node_workflow -.->|"submits plan"| node_api
node_api -->|"validates request"| node_schemas
node_api -->|"runs training"| node_pipeline
node_pipeline -->|"prepares data"| node_preprocess
node_pipeline -->|"builds estimators"| node_models
node_pipeline -->|"evaluates predictions"| node_metrics
node_pipeline -->|"generates plots"| node_plots
node_pipeline -->|"generates reports"| node_reports
node_pipeline -->|"saves model"| node_utils
node_preprocess -->|"reads defaults"| node_config
node_reports -->|"reads report settings"| node_config
node_utils -->|"reads storage settings"| node_config
node_utils -.->|"writes outputs"| node_artifacts
node_reports -.->|"writes reports"| node_artifacts
node_api -.->|"returns results"| node_telegram
node_telegram -->|"delivers results"| node_user

click node_router "https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/main_workflow.json"
click node_planner "https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/ai_customize_workflow.json"
click node_workflow "https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/analyze_and_train_workflow.json"
click node_api "https://github.com/deeep095/auto_ml/blob/main/ml_engine/app.py"
click node_schemas "https://github.com/deeep095/auto_ml/blob/main/ml_engine/app.py"
click node_pipeline "https://github.com/deeep095/auto_ml/blob/main/ml_engine/pipeline.py"
click node_preprocess "https://github.com/deeep095/auto_ml/blob/main/ml_engine/preprocessing.py"
click node_models "https://github.com/deeep095/auto_ml/blob/main/ml_engine/models.py"
click node_metrics "https://github.com/deeep095/auto_ml/blob/main/ml_engine/metrics.py"
click node_plots "https://github.com/deeep095/auto_ml/blob/main/ml_engine/plots.py"
click node_reports "https://github.com/deeep095/auto_ml/blob/main/ml_engine/reports.py"
click node_utils "https://github.com/deeep095/auto_ml/blob/main/ml_engine/utils.py"
click node_config "https://github.com/deeep095/auto_ml/blob/main/ml_engine/config.py"
click node_artifacts "https://github.com/deeep095/auto_ml/tree/main/shared/artifacts"

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_router,node_planner,node_workflow,node_user toneBlue
class node_api,node_schemas,node_config toneAmber
class node_pipeline,node_preprocess,node_models,node_metrics,node_telegram toneMint
class node_plots,node_reports,node_utils,node_artifacts toneRose
```

## Components

### Telegram workflows

- [Chat router](https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/main_workflow.json): `n8n_workflows/main_workflow.json`
- [AI customizer](https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/ai_customize_workflow.json): `n8n_workflows/ai_customize_workflow.json`
- [Training workflow](https://github.com/deeep095/auto_ml/blob/main/n8n_workflows/analyze_and_train_workflow.json): `n8n_workflows/analyze_and_train_workflow.json`

### ML service

- [FastAPI routes](https://github.com/deeep095/auto_ml/blob/main/ml_engine/app.py): `ml_engine/app.py`
- [Plan and model schemas](https://github.com/deeep095/auto_ml/blob/main/ml_engine/app.py): `ml_engine/app.py`
- [Runtime configuration](https://github.com/deeep095/auto_ml/blob/main/ml_engine/config.py): `ml_engine/config.py`

### Training pipeline

- [Run coordinator](https://github.com/deeep095/auto_ml/blob/main/ml_engine/pipeline.py): `ml_engine/pipeline.py`
- [Dataset preparation](https://github.com/deeep095/auto_ml/blob/main/ml_engine/preprocessing.py): `ml_engine/preprocessing.py`
- [Model registry](https://github.com/deeep095/auto_ml/blob/main/ml_engine/models.py): `ml_engine/models.py`
- [Evaluation metrics](https://github.com/deeep095/auto_ml/blob/main/ml_engine/metrics.py): `ml_engine/metrics.py`

### Results and artifacts

- [Visualization generation](https://github.com/deeep095/auto_ml/blob/main/ml_engine/plots.py): `ml_engine/plots.py`
- [Reports and summaries](https://github.com/deeep095/auto_ml/blob/main/ml_engine/reports.py): `ml_engine/reports.py`
- [Artifact utilities](https://github.com/deeep095/auto_ml/blob/main/ml_engine/utils.py): `ml_engine/utils.py`
- [Shared artifacts](https://github.com/deeep095/auto_ml/tree/main/shared/artifacts): `shared/artifacts`

### Other components

- **Telegram user**
- **Telegram Bot API**

## Connections

- Telegram user → Chat router: sends dataset (evidence: `README.md`)
- Chat router → AI customizer: requests planning
- AI customizer → Training workflow: customizes plan
- Training workflow → FastAPI routes: submits plan
- FastAPI routes → Plan and model schemas: validates request (evidence: `ml_engine/app.py`)
- FastAPI routes → Run coordinator: runs training (evidence: `ml_engine/app.py`)
- Run coordinator → Dataset preparation: prepares data (evidence: `ml_engine/pipeline.py`)
- Run coordinator → Model registry: builds estimators (evidence: `ml_engine/pipeline.py`)
- Run coordinator → Evaluation metrics: evaluates predictions (evidence: `ml_engine/pipeline.py`)
- Run coordinator → Visualization generation: generates plots (evidence: `ml_engine/pipeline.py`)
- Run coordinator → Reports and summaries: generates reports (evidence: `ml_engine/pipeline.py`)
- Run coordinator → Artifact utilities: saves model (evidence: `ml_engine/pipeline.py`)
- Dataset preparation → Runtime configuration: reads defaults (evidence: `ml_engine/preprocessing.py`)
- Reports and summaries → Runtime configuration: reads report settings (evidence: `ml_engine/reports.py`)
- Artifact utilities → Runtime configuration: reads storage settings (evidence: `ml_engine/utils.py`)
- Artifact utilities → Shared artifacts: writes outputs
- Reports and summaries → Shared artifacts: writes reports
- FastAPI routes → Telegram Bot API: returns results (evidence: `README.md`)
- Telegram Bot API → Telegram user: delivers results (evidence: `README.md`)
