nvflare.app_common.ccwf.recipes.swarm module

class BaseSwarmLearningRecipe(name: str, server_config: SwarmServerConfig, client_config: SwarmClientConfig, cse_config: CrossSiteEvalConfig | None = None)[source]

Bases: Recipe

This is base class of a recipe. Recipes are implemented by jobs. A concrete recipe must provide the job for recipe implementation.

Parameters:

job – the job that implements the recipe.

class SimpleSwarmLearningRecipe(name: str, initial_model, num_rounds: int, train_script: str, train_args: dict | None = None, do_cross_site_eval: bool = False, cross_site_eval_timeout: float = 300)[source]

Bases: BaseSwarmLearningRecipe

This is base class of a recipe. Recipes are implemented by jobs. A concrete recipe must provide the job for recipe implementation.

Parameters:

job – the job that implements the recipe.