Class - StragglerPolicy#

class openfl.component.aggregator.straggler_handling.StragglerPolicy[source]#

Bases: ABC

Federated Learning straggler handling interface.

__init__()#

Methods

__init__()

reset_policy_for_round()

Reset policy for the next round.

start_policy(**kwargs)

Start straggler handling policy for collaborator for a particular round.

straggler_cutoff_check(...)

Determines whether the round should end early when straggler policy conditions are met.

abstract reset_policy_for_round()[source]#

Reset policy for the next round.

Return type:

None

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.