Skip to main content

Hydraflow integrates Hydra and MLflow to manage and track machine learning experiments.

Project description

Hydraflow

PyPI Version Python Version Build Status Coverage Status

Overview

Hydraflow is a library designed to seamlessly integrate Hydra and MLflow, making it easier to manage and track machine learning experiments. By combining the flexibility of Hydra's configuration management with the robust experiment tracking capabilities of MLflow, Hydraflow provides a comprehensive solution for managing complex machine learning workflows.

Key Features

  • Configuration Management: Utilize Hydra's advanced configuration management to handle complex parameter sweeps and experiment setups.
  • Experiment Tracking: Leverage MLflow's tracking capabilities to log parameters, metrics, and artifacts for each run.
  • Artifact Management: Automatically log and manage artifacts, such as model checkpoints and configuration files, with MLflow.
  • Seamless Integration: Easily integrate Hydra and MLflow in your machine learning projects with minimal setup.

Installation

You can install Hydraflow via pip:

pip install hydraflow

Getting Started

Here is a simple example to get you started with Hydraflow:

import hydra
import hydraflow
import mlflow
from dataclasses import dataclass
from hydra.core.config_store import ConfigStore
from pathlib import Path

@dataclass
class MySQLConfig:
    host: str = "localhost"
    port: int = 3306

cs = ConfigStore.instance()
cs.store(name="config", node=MySQLConfig)

@hydra.main(version_base=None, config_name="config")
def my_app(cfg: MySQLConfig) -> None:
    # Set experiment by Hydra job name.
    hydraflow.set_experiment()

    # Automatically log Hydra config as params.
    with hydraflow.start_run():
        # Your app code below.

        with hydraflow.watch(callback):
            # Watch files in the MLflow artifact directory.
            # You can update metrics or log other artifacts
            # according to the watched files in your callback
            # function.
            pass

# Your callback function here.
def callback(file: Path) -> None:
    pass

if __name__ == "__main__":
    my_app()

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

hydraflow-0.4.4.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

hydraflow-0.4.4-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file hydraflow-0.4.4.tar.gz.

File metadata

  • Download URL: hydraflow-0.4.4.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for hydraflow-0.4.4.tar.gz
Algorithm Hash digest
SHA256 0100cae6e8e0fa35d6412300a133aed3d49cf94978061a0aa46c9aa1c54f0151
MD5 8f55bf0dc0b493dce7e21ad21c4c7ee9
BLAKE2b-256 667737267d7d51eedb2e4f02928d0c4e5d594dfaf2a04411843ee75bb3818e57

See more details on using hashes here.

File details

Details for the file hydraflow-0.4.4-py3-none-any.whl.

File metadata

  • Download URL: hydraflow-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for hydraflow-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 feff8a58a153fad45dbe6e45674f87b4e92a3035b3ee4564c86a5d0227fb3704
MD5 a19aca9ba1136006fbac3252105effae
BLAKE2b-256 5f38cefb348ef47901adfb1f83a83f70621325eedc48e82755c06dd35fc68b85

See more details on using hashes here.

Supported by

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