# hpci-lab/yprov4ml_mlflow_plugin architecture

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

- Interactive diagram: https://gitdiagram.com/hpci-lab/yprov4ml_mlflow_plugin
- Repository: https://github.com/hpci-lab/yprov4ml_mlflow_plugin

## Overview

##### Project type and purpose
- This is an open-source MLflow plugin (“yProv4ML_MLflow_Plugin”) that provides a custom storage backend (in store.py) to capture and persist ML provenance metadata alongside your regular MLflow artifacts.
- Key indicators: a single Python package directory (`mlflow-yprov4ml-plugin`), a `store.py` implementing a store interface, and a `setup.py` for Python packaging.

##### File structure
- Top level:
- `.gitignore`, `LICENSE`, `README.md` – standard project metadata.
- `setup.py` – defines entry points to register the plugin with MLflow.
- `mlflow-yprov4ml-plugin/` – contains `store.py`, the heart of the plugin.
- Patterns: This is a plugin targeting MLflow’s plugin architecture (not a full‐stack app).
- No “frontend” or “backend” folders, but an extension point: MLflow’s store interface.

##### README for additional insights
- The README only gives the plugin name, implying that the detailed documentation is either within code comments or external docs.
- We infer from the package name and structure that the plugin registers a new store for MLflow Tracking (replacing or augmenting MLflow’s default artifact/metadata store) to capture provenance.

##### Elements
- Clear labels: “MLflow Client”, “MLflow Tracking Server”, “yProv4ML Store Plugin”, “Underlying MLflow Storage”, “Provenance Database”.
- Client → Tracking Server API
- Tracking Server → Plugin
- Plugin → Provenance DB (for metadata)
- Plugin → Underlying Storage (for artifacts/metrics)
- Blue rectangles for MLflow core components.
- Green for the yProv4ML plugin.
- Grey rectangle for the underlying storage (file system or SQL).

##### Final checklist for the engineer
- Plugin’s dual‐write behavior (artifact vs. provenance) is visually distinguished.
- Annotations note the MLflow entry point in `setup.py` and the main logic location (`store.py`).

## Diagram (Mermaid)

```mermaid
flowchart TD
    Client["MLflow Client"]:::core
    Server["MLflow Tracking Server"]:::core
    Plugin["yProv4ML Store Plugin"]:::plugin
    ProvDB["Provenance Database"]:::db
    Storage["Underlying MLflow Storage"]:::storage
    AnalysisTools["Provenance Analysis Tools"]:::external
    PackageDir["Plugin Package Directory"]:::plugin
    EntryPoint["Plugin Registration (setup.py)"]:::plugin

    Client -->|"API calls"| Server
    Server -->|"storage calls"| Plugin
    Plugin -->|"write provenance"| ProvDB
    Plugin -->|"delegate artifact/metrics"| Storage
    AnalysisTools -->|"query provenance"| ProvDB
    AnalysisTools -->|"query metadata"| Storage
    PackageDir -->|"implements store"| Plugin
    EntryPoint -->|"registers plugin"| Plugin

    click Plugin "https://github.com/hpci-lab/yprov4ml_mlflow_plugin/blob/main/mlflow-yprov4ml-plugin/store.py"
    click PackageDir "https://github.com/hpci-lab/yprov4ml_mlflow_plugin/tree/main/mlflow-yprov4ml-plugin/"
    click EntryPoint "https://github.com/hpci-lab/yprov4ml_mlflow_plugin/blob/main/setup.py"

    classDef core fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef plugin fill:#90EE90,stroke:#333,stroke-width:1px
    classDef storage fill:#D3D3D3,stroke:#333,stroke-width:1px
    classDef db fill:#F5DEB3,stroke:#333,stroke-width:1px
    classDef external fill:#FFE4E1,stroke:#333,stroke-width:1px
```
