# mwasifanwar/automl-genius architecture

> Architecture diagram of the GitHub repository mwasifanwar/automl-genius, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mwasifanwar/automl-genius
- Repository: https://github.com/mwasifanwar/automl-genius

## Overview

##### Project type and purpose
- AutoML-Genius is a Python-based command-line AutoML framework. It ingests data, trains a model, runs hyperparameter optimization, produces explanations of the model, and emits ready-to-deploy code.

##### File structure
- Top level:
- main.py – entry point / CLI or orchestrator
- requirements.txt – external Python dependencies
- core/ – contains the core AutoML components
- utils/ – supporting utilities (configuration, data preprocessing)
- core/ submodules:
- automl_engine.py – main orchestration of the AutoML pipeline
- hyperparameter_optimizer.py – encapsulates search over parameter space
- model_explainer.py – generates model interpretability reports
- code_generator.py – turns trained models into deployment code
- utils/ submodules:
- config.py – loading and validating run configurations
- data_processor.py – ingestion, cleaning, and feature-engineering

##### README for additional insights
- Confirms that the tool does four things in sequence: train, optimize, explain, generate code.

##### Key reminders
- Essential modules from the file tree
- Who calls whom and what is returned at every stage
- Avoid over-abstracting: show each of the four main AutoML steps individually

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% CLI Layer
    subgraph "CLI Layer"
        main["main.py\n(CLI Orchestrator)"]:::cli
    end

    %% Utility Layer
    subgraph "Utility Layer"
        config["Configuration Loader\n(utils/config.py)"]:::utils
        data_proc["Data Processor\n(utils/data_processor.py)"]:::utils
    end

    %% Core Layer
    subgraph "Core Layer"
        automl_engine["AutoML Engine\n(core/automl_engine.py)"]:::core
        hpo["Hyperparameter Optimizer\n(core/hyperparameter_optimizer.py)"]:::core
        explainer["Model Explainer\n(core/model_explainer.py)"]:::core
        code_gen["Code Generator\n(core/code_generator.py)"]:::core
    end

    %% External Libraries
    external_libs["External Libraries\n(scikit-learn, pandas, numpy)"]:::external

    %% Outputs
    outputs["Output Artifacts\n(model files, reports, code)"]:::outputs

    %% Connections
    main -->|"load config"| config
    config -->|"read raw data"| data_proc
    data_proc -->|"features"| automl_engine
    main -->|"start pipeline"| automl_engine

    automl_engine -->|"train model"| hpo
    hpo -->|"tuned model"| automl_engine

    automl_engine -->|"model+metrics"| explainer
    explainer -->|"explanation report"| automl_engine

    automl_engine -->|"final model"| code_gen
    code_gen -->|"deployment code"| automl_engine

    automl_engine -->|"write artifacts"| outputs

    %% External usage
    external_libs -.-> data_proc
    external_libs -.-> automl_engine
    external_libs -.-> hpo
    external_libs -.-> explainer
    external_libs -.-> code_gen

    %% Click Events
    click main "https://github.com/mwasifanwar/automl-genius/blob/main/main.py"
    click config "https://github.com/mwasifanwar/automl-genius/blob/main/utils/config.py"
    click data_proc "https://github.com/mwasifanwar/automl-genius/blob/main/utils/data_processor.py"
    click automl_engine "https://github.com/mwasifanwar/automl-genius/blob/main/core/automl_engine.py"
    click hpo "https://github.com/mwasifanwar/automl-genius/blob/main/core/hyperparameter_optimizer.py"
    click explainer "https://github.com/mwasifanwar/automl-genius/blob/main/core/model_explainer.py"
    click code_gen "https://github.com/mwasifanwar/automl-genius/blob/main/core/code_generator.py"

    %% Styles
    classDef cli fill:#cce5ff,stroke:#333,stroke-width:1px;
    classDef utils fill:#ADD8E6,stroke:#333,stroke-width:1px;
    classDef core fill:#90EE90,stroke:#333,stroke-width:1px;
    classDef external fill:#D3D3D3,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5;
    classDef outputs fill:#FFD700,stroke:#333,stroke-width:1px;
```
