Skip to main content

MLflow plugin that adds W3C PROV provenance tracking to every experiment via yProv4ML

Project description

HPCI Lab Logo

yProv4ML MLflow Plugin

An MLflow plugin that integrates provenance tracking with sustainability metrics for ML experiments built on the yProv4ML library.

Report Bug · Request Feature


Contributors Forks Stars Issues GPLv3 License

An MLflow plugin that integrates W3C PROV-compliant provenance tracking with sustainability metrics for machine learning experiments built on the yProv4ML (prov4ml) library.

🚀 Installation

Prerequisites

  • Python 3.9 or higher
  • pip package manager
  • Git (for installing from source)

Installation (Recommended)

pip install -r requirements.txt
# Clone the repository
git clone https://github.com/yourusername/yProv4ML_MLflow_Plugin.git
cd yProv4ML_MLflow_Plugin

# Install the plugin in development mode
pip install .

Verify Installation

# Check that the plugin is registered
python -c "import mlflow; print(mlflow.__version__)"

# Verify prov4ml is installed
python -c "import prov4ml; print('prov4ml installed successfully')"

# Check plugin entry points
python -c "from importlib.metadata import entry_points; eps = [ep for ep in entry_points().get('mlflow.tracking_store', []) if 'yprov' in ep.name]; print(f'Found {len(eps)} yprov entry points')"

# Test basic functionality
python -c "import mlflow; mlflow.set_tracking_uri('yprov+file:///tmp/test'); print('✅ Plugin activated successfully')"

⚡ Quick Start

The plugin activates automatically when you use the yprov+ URI scheme:

import mlflow

# 🔑 CRITICAL: Use yprov+ prefix to activate the plugin
mlflow.set_tracking_uri("yprov+file:///path/to/mlruns")

# Standard MLflow code - no changes needed!
mlflow.set_experiment("my_experiment")

with mlflow.start_run(run_name="example_run"):
    # Log parameters
    mlflow.log_param("learning_rate", 0.001)
    mlflow.log_param("batch_size", 32)
    
    # Log metrics
    for epoch in range(5):
        mlflow.log_metric("loss", 0.5 - epoch * 0.05, step=epoch)
        mlflow.log_metric("accuracy", 0.7 + epoch * 0.05, step=epoch)
    
    # Log artifacts
    mlflow.log_artifact("model.pt", artifact_path="models")

# ✅ PROV JSON automatically generated in data/prov/my_experiment/

🙏 Acknowledgments


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yprov_mlflow_plugin-0.2.0.tar.gz (53.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yprov_mlflow_plugin-0.2.0-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

Details for the file yprov_mlflow_plugin-0.2.0.tar.gz.

File metadata

  • Download URL: yprov_mlflow_plugin-0.2.0.tar.gz
  • Upload date:
  • Size: 53.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for yprov_mlflow_plugin-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0f31dfa69d7c8924f10df8b719cdc70d6c18916bce9208e3fc9ed426492db810
MD5 3a0a728638c1287e6026e422305eb662
BLAKE2b-256 a5ac86cab4f97665956a3b1bdf3f65d96996e8608551e0f214097a1f583d4d6c

See more details on using hashes here.

File details

Details for the file yprov_mlflow_plugin-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yprov_mlflow_plugin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 76f000872334acbcb82ca6c3f6ce0ec72cfb8a652ded1006d213f5443593df59
MD5 dd4c3a1696985ed7954f321cd03170f6
BLAKE2b-256 e9d065a458efdcd2415ecdda043c3c7766d9644edca157af9d67dd83b934e5f9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page