# openvinotoolkit/openvino_notebooks architecture

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

- Interactive diagram: https://gitdiagram.com/openvinotoolkit/openvino_notebooks
- Repository: https://github.com/openvinotoolkit/openvino_notebooks

## Overview

##### Project Type and Purpose
This is an educational and development toolkit project focused on providing Jupyter notebooks for learning and experimenting with OpenVINO™ Toolkit for optimized deep learning inference.

##### Main Components

a. Core Infrastructure:
- Notebooks Environment Layer
- Jupyter Lab/Notebook Server
- Python Environment Management
- OpenVINO Runtime

b. Content Organization:
- Notebooks Collection Layer
- Tutorial Notebooks
- Example Applications
- Utility Functions
- Documentation

c. Development Tools:
- CI/CD Pipeline
- Testing Framework
- Documentation Generator
- Selector Application

**┌─ OpenVINO™ Notebooks System ──────────────────────────────────┐**

- ┌─ User Interface Layer ─────────────────────────────────┐   │

- Jupyter Lab/Notebook Interface                       │   │
- Web-based Selector Application                       │   │

- ┘   │

- ┌─ Content Layer ───────────────────────────────────────┐   │

- ┌─ Notebooks ─┐ ┌─ Utils ──┐ ┌─ Documentation ──┐     │   │

- Tutorials│ │ - Helpers│ │ - README         │     │   │
- Examples │ │ - Tools  │ │ - Wiki           │     │   │
- ┘ └──────────┘ └──────────────────┘     │   │

- ┘   │

- ┌─ Infrastructure Layer ─────────────────────────────────┐   │

- ┌─ Runtime ───┐ ┌─ Dependencies ┐ ┌─ CI/CD ────────┐  │   │

- OpenVINO │ │ - Python Pkgs │ │ - GitHub      │  │   │
- Kernels  │ │ - Libraries   │ │   Actions     │  │   │
- ┘ └───────────────┘ └────────────────┘  │   │

- ┘   │

- ┘

##### Key Relationships
- Integration lines between CI/CD and all other components
- Data flow indicators for notebook execution paths

##### Additional Elements
- Version compatibility matrix
- Supported device indicators
- Environment setup sequence

##### Implementation Notes
- Use standard UML notation where applicable
- Annotations for critical dependencies
- Optional components vs. required components
- System requirements as metadata

Remember to emphasize the modular nature of the system and how different components can be used independently or together to achieve various learning and development objectives with OpenVINO™.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Legend"
        L1[Core OpenVINO]:::blue
        L2[Notebook Components]:::green
        L3[Infrastructure]:::orange
        L4[Integration Points]:::purple
        L5[External Systems]:::gray
    end

    subgraph "Frontend Layer"
        UI["Jupyter Lab/Notebook Interface"]:::green
        NS["Notebook Selector App"]:::green
        IC["Interactive Components"]:::green
    end

    subgraph "Core Processing Layer"
        OVR["OpenVINO Runtime"]:::blue
        MOP["Model Optimization Pipeline"]:::blue
        IE["Inference Engine"]:::blue
        subgraph "Device Plugins"
            CPU["CPU Plugin"]:::blue
            GPU["GPU Plugin"]:::blue
            NPU["NPU Plugin"]:::blue
        end
    end

    subgraph "Notebook Management"
        NMS["Metadata System"]:::green
        COS["Content Organization"]:::green
        VS["Validation System"]:::green
    end

    subgraph "Infrastructure Layer"
        EM["Environment Management"]:::orange
        DH["Dependencies Handler"]:::orange
        DDS["Device Detection"]:::orange
        DE["Docker Environment"]:::orange
        UF["Utility Functions"]:::orange
    end

    subgraph "Integration Layer"
        ES["External Services"]:::purple
        MZ["Model Zoo"]:::purple
        subgraph "Framework Connectors"
            PT["PyTorch Integration"]:::purple
            TF["TensorFlow Integration"]:::purple
            ON["ONNX Integration"]:::purple
        end
    end

    subgraph "CI/CD and Documentation"
        CI["CI/CD Workflows"]:::orange
        TF["Testing Framework"]:::orange
        VT["Validation Tools"]:::orange
        DOC["Documentation"]:::gray
    end

    UI --> NS
    UI --> IC
    NS --> NMS
    IC --> OVR
    NMS --> COS
    COS --> VS
    OVR --> MOP
    MOP --> IE
    IE --> CPU & GPU & NPU
    EM --> DH
    DH --> DE
    DE --> UF
    ES --> MZ
    PT & TF & ON --> MOP
    VS --> CI
    CI --> TF
    TF --> VT
    
    %% Click events for component mapping
    click NS "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/selector/"
    click IC "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/notebooks/*/gradio_helper.py"
    click NMS "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/selector/src/notebook-metadata/"
    click COS "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/"
    click VS "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/.ci/validate_notebooks.py"
    click EM "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/.binder/"
    click DH "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/.ci/pip_conflicts_check.sh"
    click DE "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/.docker/"
    click UF "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/utils/"
    click CI "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/.github/workflows/"
    click TF "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/.ci/test_notebooks.py"
    click VT "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/.ci/validation_config.py"
    click DOC "https://github.com/openvinotoolkit/openvino_notebooks/blob/latest/README.md"
    click PT "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/pytorch-to-openvino/"
    click TF "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/tensorflow-hub/"
    click ON "https://github.com/openvinotoolkit/openvino_notebooks/tree/latest/notebooks/"

    classDef blue fill:#3498db
    classDef green fill:#2ecc71
    classDef orange fill:#e67e22
    classDef purple fill:#9b59b6
    classDef gray fill:#95a5a6
```
