HydraFlow
Overview
HydraFlow seamlessly integrates Hydra and MLflow to streamline machine learning experiment workflows. By combining Hydra's powerful configuration management with MLflow's robust experiment tracking, HydraFlow provides a comprehensive solution for defining, executing, and analyzing machine learning experiments.
Design Principles
HydraFlow is built on the following design principles:
- Type Safety - Utilizing Python dataclasses for configuration type checking and IDE support
- Reproducibility - Automatically tracking all experiment configurations for fully reproducible experiments
- Analysis Capabilities - Providing powerful APIs for easily analyzing experiment results
- Workflow Integration - Creating a cohesive workflow by integrating Hydra's configuration management with MLflow's experiment tracking
Key Features
- Type-safe Configuration Management - Define experiment parameters using Python dataclasses with full IDE support and validation
- Seamless Hydra-MLflow Integration - Automatically register configurations with Hydra and track experiments with MLflow
- Advanced Parameter Sweeps - Define complex parameter spaces using extended sweep syntax for numerical ranges, combinations, and SI prefixes
- Workflow Automation - Create reusable experiment workflows with YAML-based job definitions
- Powerful Analysis Tools - Filter, group, and analyze experiment results with type-aware APIs
- Custom Implementation Support - Extend experiment analysis with domain-specific functionality
Installation
pip install hydraflow
Requirements: Python 3.13+
Quick Example
import hydraflow
from dataclasses import dataclass
from mlflow.entities import Run
@dataclass
class Config:
width: int = 1024
height: int = 768
@hydraflow.main(Config)
def app(run: Run, cfg: Config) -> None:
# Your experiment code here
print(f"Running with width={cfg.width}, height={cfg.height}")
if __name__ == "__main__":
app()
Execute a parameter sweep with:
python app.py -m width=800,1200 height=600,900
Core Components
HydraFlow consists of the following key components:
Configuration Management
Define type-safe configurations using Python dataclasses:
@dataclass
class Config:
learning_rate: float = 0.001
batch_size: int = 32
epochs: int = 10
Main Decorator
The @hydraflow.main decorator integrates Hydra and MLflow:
@hydraflow.main(Config)
def train(run: Run, cfg: Config) -> None:
# Your experiment code
Workflow Automation
Define reusable experiment workflows in YAML:
jobs:
train_models:
run: python train.py
sets:
- each: model=small,medium,large
all: learning_rate=0.001,0.01,0.1
Analysis Tools
Analyze experiment results with powerful APIs:
import mlflow
from hydraflow import Run, iter_run_dirs
# Load runs
runs = Run.load(iter_run_dirs())
# Filter and analyze
best_runs = runs.filter(model_type="transformer").to_frame("learning_rate", "accuracy")
Documentation
For detailed documentation, visit our documentation site:
- Getting Started - Installation and core concepts
- Practical Tutorials - Learn through hands-on examples
- User Guide - Detailed documentation of HydraFlow's capabilities
- API Reference - Complete API documentation
License
This project is licensed under the MIT License.
Metadata
Release files for hydraflow 0.23.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hydraflow-0.23.2.tar.gz | 29.4 kB | Without provenance | Details for hydraflow-0.23.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hydraflow-0.23.2-py3-none-any.whl | Python 3 | none | any | Details for hydraflow-0.23.2-py3-none-any.whl |
Total release size: 66.1 kB
Release files / hydraflow-0.23.2.tar.gz
| Download URL | hydraflow-0.23.2.tar.gz |
|---|---|
| Size | 29.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f32030f2b149ca989b21895cda3708e8727ae812a040956889b47d9480a117d
|
|
BLAKE2b-256 checksum How to use checksums |
c3ec16049e33cfde4f8882d39e4bd0673d3926ee6ded56cb16aed0ff87e21cfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / hydraflow-0.23.2-py3-none-any.whl
| Download URL | hydraflow-0.23.2-py3-none-any.whl |
|---|---|
| Size | 36.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a97f4f9c8dc8af7e1f8ce0346f3b7fa7791b17654b9c142dbebd3358f70b0590
|
|
BLAKE2b-256 checksum How to use checksums |
241d68552818eb9524825b37500f1421f2271acfa80a465292f286dca9016ebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for hydraflow 0.23.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.