Use Adapters¶
FlowerPower supports optional adapters for observability, experiment tracking, and distributed execution. Adapters are configured in conf/project.yml (and optionally per-pipeline in conf/pipelines/<name>.yml) and are toggled per run via with_adapter_cfg.
Available adapters¶
The with_adapter_cfg toggle accepts the following fields from WithAdapterConfig:
| Field | Adapter | Purpose |
|---|---|---|
hamilton_tracker |
Hamilton Tracker | Capture dataflow lineage and execution metadata. |
mlflow |
MLflow | Log runs, parameters, and artifacts to MLflow. |
ray |
Ray | Execute nodes across a Ray cluster. |
progressbar |
Progress bar | Show a terminal progress bar during the run. |
future |
Future | Reserved for upcoming adapters. |
All fields default to false. Enable only the ones you need.
Adapter configuration¶
A generated conf/project.yml contains an adapter block like this:
Set the URLs and credentials before enabling an adapter. For per-pipeline overrides, add an adapter block under conf/pipelines/<name>.yml.
Run with the Hamilton Tracker¶
Enable the tracker at run time:
Visualize tracked runs with the Hamilton UI:
The UI opens on http://localhost:8242 by default. Tracker data is sent to the api_url configured in conf/project.yml.
Run with MLflow¶
Enable MLflow and point it at a tracking server in conf/project.yml:
Then enable it on the run:
Run with Ray¶
Use Ray for distributed execution by installing the extra and enabling the Ray adapter:
Ray settings such as ray_init_config and shutdown_ray_on_completion are read from conf/project.yml.
Layering and precedence¶
- Project-level adapter settings live in
conf/project.yml. - Per-pipeline settings in
conf/pipelines/<name>.ymloverride the project defaults. - Runtime
with_adapter_cfgtoggles which adapters are actually instantiated for that run.
Tip
Keep sensitive credentials in environment variables and reference them in YAML with ${API_KEY} or ${API_KEY:-default}.