Class - StragglerPolicy#
- class openfl.component.aggregator.straggler_handling.StragglerPolicy[source]#
Bases:
ABCFederated Learning straggler handling interface.
- __init__()#
Methods
__init__()Reset policy for the next round.
start_policy(**kwargs)Start straggler handling policy for collaborator for a particular round.
Determines whether the round should end early when straggler policy conditions are met.
- abstract start_policy(**kwargs)[source]#
Start straggler handling policy for collaborator for a particular round. NOTE: Refer CutoffTimePolicy class for reference.
- Parameters:
**kwargs
- Return type:
None
- abstract straggler_cutoff_check(num_collaborators_done, num_all_collaborators, **kwargs)[source]#
Determines whether the round should end early when straggler policy conditions are met.
- Parameters:
num_collaborators_done (int) – int Number of collaborators finished.
num_all_collaborators (int) – int Total number of collaborators.
- Returns:
True if it is time to end the round early, False otherwise.
- Return type:
bool
- Raises:
NotImplementedError – This method must be implemented by a subclass.