nvflare.app_opt.flower.flower_job module

class FlowerJob(name: str, flower_content: str | None = None, flower_app_path: str | None = None, min_clients: int = 1, mandatory_clients: List[str] | None = None, database: str = '', superlink_ready_timeout: float = 10.0, configure_task_timeout=10, start_task_timeout=10, max_client_op_interval: float = 90.0, progress_timeout: float = 3600.0, per_msg_timeout=10.0, tx_timeout=100.0, client_shutdown_timeout=5.0, extra_env: dict | None = None, run_config: dict | None = None, allow_runtime_dependency_installation: bool = False)[source]

Bases: FedJob

Flower Job.

Parameters:
  • name (str) – Name of the job.

  • flower_content (str, optional) – Local directory path containing Flower app code (BYOC mode).

  • flower_app_path (str, optional) – Absolute path to pre-deployed Flower app on the server (pre-deployed mode). The server distributes the app to clients via Flower’s FAB mechanism.

  • min_clients (int, optional) – The minimum number of clients for the job. Defaults to 1.

  • mandatory_clients (List[str], optional) – List of mandatory clients for the job. Defaults to None.

  • database (str, optional) – Database string. Defaults to “”.

  • superlink_ready_timeout (float, optional) – Timeout for the superlink to be ready. Defaults to 10.0 seconds.

  • configure_task_timeout (float, optional) – Timeout for configuring the task. Defaults to Constant.CONFIG_TASK_TIMEOUT.

  • start_task_timeout (float, optional) – Timeout for starting the task. Defaults to Constant.START_TASK_TIMEOUT.

  • max_client_op_interval (float, optional) – Maximum interval between client operations. Defaults to Constant.MAX_CLIENT_OP_INTERVAL.

  • progress_timeout (float, optional) – Timeout for workflow progress. Defaults to Constant.WORKFLOW_PROGRESS_TIMEOUT.

  • per_msg_timeout (float, optional) – Timeout for receiving individual messages. Defaults to 10.0 seconds.

  • tx_timeout (float, optional) – Timeout for transmitting data. Defaults to 100.0 seconds.

  • client_shutdown_timeout (float, optional) – Timeout for client shutdown. Defaults to 5.0 seconds.

  • extra_env (dict, optional) – optional extra env variables to be passed to Flower client

  • run_config (dict, optional) – optional dict for flwr run –run-config arguments

  • allow_runtime_dependency_installation (bool, optional) – whether to allow dynamic dependency installation. Defaults to False. (only flwr>=1.29)