# mll-group/pachyderm-demo-project architecture

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

- Interactive diagram: https://gitdiagram.com/mll-group/pachyderm-demo-project
- Repository: https://github.com/mll-group/pachyderm-demo-project

## Overview

##### Data Flow Representation

- Data ingestion flow → Repository
- Repository → Pipeline Processing
- Pipeline Output → New Repository Version
- Version Control Operations (branching, committing)

##### Pipeline Specific Elements

- Pipeline Definition (using the example from README)
- Worker Scaling
- Trigger System
- Output Management

##### Important Details

Callouts for:
- Authentication/Authorization (Community vs Enterprise features)
- Automatic Triggering Mechanisms
- Data Deduplication
- Version Control Operations

##### Project-Specific Elements

- Configuration Management (`config/` directory)
- Data Processing Scripts (`src/` directory)
- Experiment Tracking (`experiment/` directory)
- Dataset Configurations (`config/dataset/`)

##### User Interfaces and Integration Points (top layer)

Key Considerations:

- Git-like nature of data versioning
- Relationship between data changes and pipeline triggers
- Scalability aspects through Kubernetes
- Immutable data lineage feature
- Local development setup path

- All symbols used
- Component relationships

Keep the abstraction level appropriate by:
- Focusing on the main architectural components
- Avoiding too much detail in the implementation specifics
- Maintaining clarity in the data flow paths
- Emphasizing the versioning and pipeline aspects

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Style Definitions
    classDef infrastructure fill:#d3d3d3,stroke:#333
    classDef core fill:#4a90e2,stroke:#333
    classDef storage fill:#98FB98,stroke:#333
    classDef processing fill:#FFA500,stroke:#333
    classDef integration fill:#DDA0DD,stroke:#333

    %% Legend
    subgraph Legend
        L1[Infrastructure]:::infrastructure
        L2[Core Components]:::core
        L3[Storage]:::storage
        L4[Processing]:::processing
        L5[Integration Points]:::integration
    end

    %% Integration Layer
    subgraph IntegrationLayer["Integration Layer"]
        JupyterLab[JupyterLab]:::integration
        click JupyterLab "https://github.com/MLL-group/pachyderm-demo-project/tree/main/notebooks/"
        BigQuery[BigQuery Connector]:::integration
        LabelStudio[Label Studio]:::integration
        WandB[Weights & Biases]:::integration
    end

    %% Data Management Layer
    subgraph DataManagement["Data Management Layer"]
        ConfigMgmt[Configuration Management]:::core
        click ConfigMgmt "https://github.com/MLL-group/pachyderm-demo-project/blob/main/config/configuration.yaml"
        DatasetConfig[Dataset Configurations]:::core
        click DatasetConfig "https://github.com/MLL-group/pachyderm-demo-project/blob/main/config/dataset/bin_cls.yaml"
        VersionControl[Version Control System]:::core
        DataLineage[Data Lineage Tracking]:::core
        
        subgraph Storage["Storage Components"]
            RepoStorage[Repository Storage]:::storage
            click RepoStorage "https://github.com/MLL-group/pachyderm-demo-project/tree/main/data/"
            ObjStorage[Object Storage]:::storage
        end

        subgraph Processing["Processing Components"]
            PipelineEngine[Pipeline Execution Engine]:::processing
            DataProcessing[Data Processing Scripts]:::processing
            click DataProcessing "https://github.com/MLL-group/pachyderm-demo-project/blob/main/src/prepare_data.py"
            ConfigHandler[Configuration Handler]:::processing
            click ConfigHandler "https://github.com/MLL-group/pachyderm-demo-project/blob/main/src/config.py"
        end

        ExperimentTracker[Experiment Tracking]:::core
        click ExperimentTracker "https://github.com/MLL-group/pachyderm-demo-project/tree/main/experiment/"
        TestFramework[Testing Framework]:::core
        click TestFramework "https://github.com/MLL-group/pachyderm-demo-project/tree/main/tests/"
    end

    %% Infrastructure Layer
    subgraph Infrastructure["Infrastructure Layer"]
        subgraph K8s["Kubernetes Cluster"]
            Minikube[Minikube/Kind]:::infrastructure
            PachCtrl[Pachyderm Control Plane]:::infrastructure
            PipelineWorkers[Pipeline Workers]:::infrastructure
        end
    end

    %% Relationships
    JupyterLab --> ConfigMgmt
    JupyterLab --> DataProcessing
    BigQuery --> RepoStorage
    LabelStudio --> RepoStorage
    WandB --> ExperimentTracker

    ConfigMgmt --> PipelineEngine
    DatasetConfig --> PipelineEngine
    ConfigHandler --> PipelineEngine
    
    PipelineEngine --> PipelineWorkers
    DataProcessing --> PipelineEngine
    
    RepoStorage --> VersionControl
    VersionControl --> DataLineage
    
    PachCtrl --> PipelineWorkers
    PipelineWorkers --> ObjStorage
    
    ExperimentTracker --> WandB
    TestFramework --> DataProcessing
```
