nvflare.app_common.workflows.cyclic module
- class Cyclic(*args, num_clients: int = 2, num_rounds: int = 5, start_round: int = 0, memory_gc_rounds: int = 0, **kwargs)[source]
Bases:
ModelControllerThe Cyclic ModelController to implement the Cyclic Weight Transfer (CWT) algorithm.
- Parameters:
num_clients (int, optional) – The number of clients. Defaults to 2.
num_rounds (int, optional) – The total number of training rounds. Defaults to 5.
start_round (int, optional) – The starting round number. Defaults to 0.
memory_gc_rounds (int, optional) – Run memory cleanup (gc.collect + malloc_trim) every N rounds. Set to 0 to disable. Defaults to 0 (disabled).