Configuration¶
FlowerPower uses a layered configuration system. Configuration is read from YAML files, environment overlays, and runtime parameters, with higher layers overriding lower layers.
Precedence¶
- Runtime
kwargsandRunConfigfields - Environment overlays:
FP_PIPELINE__*andFP_PROJECT__* - YAML files after
${VAR}interpolation - Global env shims:
FP_LOG_LEVEL,FP_EXECUTOR,FP_EXECUTOR_MAX_WORKERS,FP_EXECUTOR_NUM_CPUS,FP_MAX_RETRIES,FP_RETRY_DELAY,FP_JITTER_FACTOR - Code defaults
Nested keys in environment variables use double underscores. Values are strictly coerced and JSON strings are converted to objects or lists when possible.
YAML interpolation supports Docker Compose–style expansion:
Config¶
Module: flowerpower.cfg.Config
The composite configuration class that combines ProjectConfig and PipelineConfig.
| Attribute | Type | Description |
|---|---|---|
pipeline |
PipelineConfig |
Pipeline-specific configuration. |
project |
ProjectConfig |
Project-level configuration. |
fs |
AbstractFileSystem \| None |
Filesystem abstraction. |
base_dir |
str \| Path \| None |
Base directory for the configuration. |
storage_options |
dict |
Storage options for filesystem access. |
ProjectConfig¶
Module: flowerpower.cfg.ProjectConfig
Project-level configuration.
| Attribute | Type | Description |
|---|---|---|
name |
str \| None |
Project name. |
hooks_dir |
str \| None |
Directory for hooks. |
adapter |
AdapterConfig |
Project-level adapter settings. |
PipelineConfig¶
Module: flowerpower.cfg.PipelineConfig
Pipeline-specific configuration. The params field is a plain dictionary. When the config is loaded, h_params is generated automatically from params using to_h_params() and is used inside pipeline modules via PARAMS['function_name'].
| Attribute | Type | Description |
|---|---|---|
name |
str \| None |
Pipeline name. |
params |
dict |
Pipeline parameters. |
run |
RunConfig |
Execution configuration. |
adapter |
AdapterConfig |
Pipeline-specific adapter settings. |
h_params |
dict |
Hamilton-formatted parameters, derived from params. |
RunConfig¶
Module: flowerpower.cfg.pipeline.run.RunConfig
Encapsulates all execution parameters. See the dedicated RunConfig reference for details.
ExecutorConfig¶
Module: flowerpower.cfg.pipeline.run.ExecutorConfig
| Attribute | Type | Description |
|---|---|---|
type |
str \| None |
Executor type, e.g., "synchronous", "threadpool", "processpool", "ray". |
max_workers |
int \| None |
Max parallel tasks for thread/process executors. |
num_cpus |
int \| None |
CPU allocation for distributed executors. |
WithAdapterConfig¶
Module: flowerpower.cfg.pipeline.run.WithAdapterConfig
Adapter toggles for a single run. Enable an adapter by setting the corresponding field to True.
| Attribute | Type | Description |
|---|---|---|
hamilton_tracker |
bool |
Enable Hamilton Tracker integration. |
mlflow |
bool |
Enable MLflow integration. |
ray |
bool |
Enable Ray distributed execution. |
progressbar |
bool |
Enable a progress bar. |
future |
bool |
Enable future adapters. |
Note
Use hamilton_tracker for tracking and lineage integration.