openfl.component.straggler_handling_functions.straggler_handling_function.StragglerHandlingPolicy

class openfl.component.straggler_handling_functions.straggler_handling_function.StragglerHandlingPolicy

Bases: ABC

Federated Learning straggler handling interface.

Methods

reset_policy_for_round

Reset policy variable for the next round.

start_policy

Start straggler handling policy for collaborator for a particular round.

straggler_cutoff_check

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.