Configuration API βοΈ
Reference for flowyml.yaml and environment variables.
Stack Configuration
General Configuration
Configuration management for flowyml.
Classes
FlowymlConfig(flowyml_home: Path = (lambda: Path.home() / '.flowyml')(), artifacts_dir: Path = (lambda: Path('.flowyml/artifacts'))(), metadata_db: Path = (lambda: Path('.flowyml/metadata.db'))(), cache_dir: Path = (lambda: Path('.flowyml/cache'))(), runs_dir: Path = (lambda: Path('.flowyml/runs'))(), experiments_dir: Path = (lambda: Path('.flowyml/experiments'))(), projects_dir: Path = (lambda: Path('.flowyml/projects'))(), default_stack: str = 'local', execution_mode: str = 'local', remote_server_url: str = '', remote_ui_url: str = '', api_token: str | None = None, remote_services: list[dict[str, str]] = list(), enable_caching: bool = True, enable_checkpointing: bool = True, enable_logging: bool = True, log_level: str = 'INFO', max_cache_size_mb: int = 10000, checkpoint_dir: Path = (lambda: Path('.flowyml/checkpoints'))(), ui_host: str = 'localhost', ui_port: int = 8080, enable_ui: bool = False, auto_log_params: bool = True, auto_log_metrics: bool = True, auto_log_artifacts: bool = True, track_git: bool = True, track_environment: bool = True, max_parallel_steps: int = 4, step_timeout_seconds: int = 3600, retry_max_attempts: int = 3, debug_mode: bool = False, strict_validation: bool = True, allow_pickle: bool = True)
dataclass
Global flowyml configuration.
Functions
__post_init__()
Ensure all paths are Path objects.
Source code in flowyml/utils/config.py
create_directories() -> None
Create necessary directories.
Source code in flowyml/utils/config.py
from_dict(data: dict[str, Any]) -> FlowymlConfig
classmethod
load(path: Path | None = None) -> FlowymlConfig
classmethod
Load config from file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Path to load config from (defaults to ~/.flowyml/config.yaml) |
None
|
Returns:
| Type | Description |
|---|---|
FlowymlConfig
|
Loaded FlowymlConfig instance |
Source code in flowyml/utils/config.py
save(path: Path | None = None) -> None
Save config to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path | None
|
Path to save config (defaults to ~/.flowyml/config.yaml) |
None
|
Source code in flowyml/utils/config.py
to_dict() -> dict[str, Any]
Convert config to dictionary.
Source code in flowyml/utils/config.py
Functions
get_config() -> FlowymlConfig
Get global flowyml configuration.
Returns:
| Type | Description |
|---|---|
FlowymlConfig
|
Global FlowymlConfig instance |
Source code in flowyml/utils/config.py
get_env_config() -> dict[str, Any]
Get configuration from environment variables.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Dictionary of configuration values from environment |
Source code in flowyml/utils/config.py
init_config_from_env() -> FlowymlConfig
Initialize configuration from environment variables.
Returns:
| Type | Description |
|---|---|
FlowymlConfig
|
FlowymlConfig instance with values from environment |
Source code in flowyml/utils/config.py
load_project_config(project_dir: Path | None = None) -> dict[str, Any]
Load project-specific configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_dir
|
Path | None
|
Project directory (defaults to current directory) |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Project configuration dictionary |
Source code in flowyml/utils/config.py
reset_config() -> None
Reset global configuration to defaults and apply environment variable overrides.
Source code in flowyml/utils/config.py
save_project_config(config: dict[str, Any], project_dir: Path | None = None) -> None
Save project-specific configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
dict[str, Any]
|
Configuration dictionary |
required |
project_dir
|
Path | None
|
Project directory (defaults to current directory) |
None
|
Source code in flowyml/utils/config.py
set_config(config: FlowymlConfig) -> None
Set global flowyml configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
FlowymlConfig
|
FlowymlConfig instance to set as global |
required |
update_config(**kwargs: Any) -> None
Update global configuration with new values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Any
|
Configuration values to update |
{}
|