# negrinho/deep_architect architecture

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

- Interactive diagram: https://gitdiagram.com/negrinho/deep_architect
- Repository: https://github.com/negrinho/deep_architect

## Overview

##### Main Components
- Core Framework: This includes the “deep_architect” package with its central modules:
– core.py: Contains base classes and functions to create and traverse search spaces.
– hyperparameters.py: Defines discrete and other hyperparameter types.
– modules.py: Implements the modular composition of search space components (including substitution modules and sequential modules).
- Searchers: Represent the different search algorithms (e.g., random, mcts, regularized evolution, smbo variants) that perform hyperparameter assignments and sample architectures.
- Logging and Visualization: Show the logging subsystem (search_logging.py) and visualization (visualization.py) allowing experimentation tracking and diagramming the search space or results.
- Backend Connectors: Highlight the “helpers” (e.g., keras_support.py, pytorch_support.py, tensorflow_*_support.py) and deep learning backend modules under “contrib/deep_learning_backend” that enable interfacing with different computational graph frameworks.
- Containers and Documentation: The “containers” and “docs” directories represent deployment scripts (Singularity containers) and reference documentation, respectively.

##### Relationships and Interactions
– Illustrate that the output of a Searcher flows into an Evaluator, which computes performance metrics.
– Include bidirectional relationships between the Searcher and Logging (i.e., the searcher “updates” results according to logged metrics).
– Show how Visualization tools read from the search space and logging outputs to generate graphical representations.

##### Architectural Patterns and Design Principles
– Emphasize modularity: The system is architected as a collection of interchangeable components (search spaces, searchers, evaluators, etc.). Reflect this by clearly grouping related modules.
– Extensibility and composability: Indicate points where users can plug in new search algorithms or new evaluation metrics without changing the core framework.

##### Relevant Technologies and Frameworks
– Highlight that the framework caters to deep learning libraries along with possible integration with non–deep learning modules (e.g., scikit-learn).
– Although not an application server, important supporting libraries include standard Python libraries plus those required by deep learning frameworks (Keras, TensorFlow, PyTorch) as seen in helper modules.
– Note that container orchestration and deployment (e.g., Kubernetes in the examples) is also supported, which can be depicted as external systems interacting with the main components.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Core Framework Subgraph
    subgraph "Core Framework"
        core["\"core.py\""]:::core
        hyper["\"hyperparameters.py\""]:::core
        modules["\"modules.py\""]:::core
    end

    %% Searchers Subgraph
    subgraph "Searchers"
        search["\"Searchers\""]:::searcher
    end

    %% Evaluators Subgraph
    subgraph "Evaluators"
        eval_contrib["\"Contrib Evaluators\""]:::evaluator
        eval_dev["\"Dev Evaluators\""]:::evaluator
    end

    %% Logging and Visualization
    logging["\"Logging: search_logging.py\""]:::logging
    visualization["\"Visualization: visualization.py\""]:::visualization

    %% Backend Connectors Subgraph
    subgraph "Backend Connectors"
        helpers["\"Helpers\""]:::backend
        deep_backend["\"Deep Learning Backend\""]:::backend
    end

    %% Communication Components
    communicators["\"Communicators\""]:::comm

    %% Additional Components Subgraph
    subgraph "Additional Components"
        misc_utils["\"Misc Utilities\""]:::additional
        surrogates["\"Surrogates\""]:::additional
        dev_samples["\"Dev\""]:::additional
        examples["\"Examples\""]:::additional
    end

    %% Containers and Documentation
    subgraph "Containers & Documentation"
        containers["\"Containers\""]:::containers
        docs["\"Docs\""]:::containers
    end

    %% Connections
    %% Internal Core relationships
    hyper -->|"defines"| modules
    core -->|"establishes"| modules

    %% Core to Searchers
    modules -->|"defines_search_space"| search

    %% Searchers to Evaluators
    search -->|"samples_architecture"| eval_contrib
    search -->|"samples_architecture"| eval_dev

    %% Searchers <--> Logging (bidirectional)
    search -->|"updates"| logging
    logging -->|"feeds_back"| search

    %% Logging and Core to Visualization
    modules -->|"provides_space"| visualization
    logging -->|"provides_metrics"| visualization

    %% Backend Connectors interactions with Core
    modules -->|"translates_to_DL_ops"| helpers
    modules -->|"translates_to_DL_ops"| deep_backend

    %% Communication
    search -->|"distributed_comms"| communicators
    eval_contrib -->|"distributed_comms"| communicators
    eval_dev -->|"distributed_comms"| communicators

    %% Additional Components supporting Searchers
    misc_utils -->|"utility_support"| search
    surrogates -->|"assist_search"| search
    dev_samples -->|"experimental_use"| search
    examples -->|"sample_configurations"| search

    %% Containers & Documentation help deployment and usage
    containers -->|"deploys"| search
    docs -->|"describes"| search

    %% Click Events
    click core "https://github.com/negrinho/deep_architect/blob/master/deep_architect/core.py"
    click hyper "https://github.com/negrinho/deep_architect/blob/master/deep_architect/hyperparameters.py"
    click modules "https://github.com/negrinho/deep_architect/blob/master/deep_architect/modules.py"
    click search "https://github.com/negrinho/deep_architect/tree/master/deep_architect/searchers/"
    click eval_contrib "https://github.com/negrinho/deep_architect/tree/master/deep_architect/contrib/misc/evaluators/"
    click eval_dev "https://github.com/negrinho/deep_architect/tree/master/dev/evaluators/"
    click logging "https://github.com/negrinho/deep_architect/blob/master/deep_architect/search_logging.py"
    click visualization "https://github.com/negrinho/deep_architect/blob/master/deep_architect/visualization.py"
    click helpers "https://github.com/negrinho/deep_architect/tree/master/deep_architect/helpers/"
    click deep_backend "https://github.com/negrinho/deep_architect/tree/master/deep_architect/contrib/deep_learning_backend/"
    click communicators "https://github.com/negrinho/deep_architect/tree/master/deep_architect/contrib/communicators/"
    click misc_utils "https://github.com/negrinho/deep_architect/tree/master/deep_architect/contrib/misc/"
    click surrogates "https://github.com/negrinho/deep_architect/tree/master/deep_architect/surrogates/"
    click dev_samples "https://github.com/negrinho/deep_architect/tree/master/dev/"
    click examples "https://github.com/negrinho/deep_architect/tree/master/examples/"
    click containers "https://github.com/negrinho/deep_architect/tree/master/containers/"
    click docs "https://github.com/negrinho/deep_architect/tree/master/docs/"

    %% Styles
    classDef core fill:#FFC0CB,stroke:#000,stroke-width:2px;
    classDef searcher fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef evaluator fill:#FFDEAD,stroke:#000,stroke-width:2px;
    classDef logging fill:#FFF68F,stroke:#000,stroke-width:2px;
    classDef visualization fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef backend fill:#D8BFD8,stroke:#000,stroke-width:2px;
    classDef comm fill:#FFA07A,stroke:#000,stroke-width:2px;
    classDef additional fill:#E6E6FA,stroke:#000,stroke-width:2px;
    classDef containers fill:#D3D3D3,stroke:#000,stroke-width:2px;
```
