openfl.component.straggler_handling_functions.straggler_handling_function.StragglerHandlingPolicy
- class openfl.component.straggler_handling_functions.straggler_handling_function.StragglerHandlingPolicy
Bases:
ABCFederated Learning straggler handling interface.
Methods
Reset policy variable for the next round.
Start straggler handling policy for collaborator for a particular round.
Determines whether it is time to end the round early.
- abstract reset_policy_for_round() None
Reset policy variable for the next round.
- Parameters:
None
- Returns:
None
- abstract start_policy(**kwargs) None
Start straggler handling policy for collaborator for a particular round. NOTE: Refer CutoffTimeBasedStragglerHandling for reference.
- Parameters:
**kwargs
- Returns:
None
- abstract straggler_cutoff_check(num_collaborators_done: int, num_all_collaborators: int, **kwargs) bool
Determines whether it is time to end the round early.
- Parameters:
num_collaborators_done – int Number of collaborators finished.
num_all_collaborators – int Total number of collaborators.
- Returns:
bool – True if it is time to end the round early, False otherwise.
- Raises:
NotImplementedError – This method must be implemented by a subclass.