fluke.distr.client

Classes included in fluke.distr.client

ParallelClient

A client that can be used in a parallel setting.

class fluke.distr.client.ParallelClient

class fluke.distr.client.ParallelClient(builder: ModelBuilder, *args: Any, **kwargs)[source]

A client that can be used in a parallel setting.

local_update(current_round: int, current_model_sd: dict, device: str, prefit: bool, postfit: bool, evaluator: Evaluator) tuple[Module, float, int][source]

Perform a local update on the [Parallel] client.

Parameters:
  • current_round (int) – The current round of training.

  • current_model_sd (dict) – The state dictionary of the current model.

  • device (str) – The device to use for training.

  • prefit (bool) – Whether to evaluate the model before fitting.

  • postfit (bool) – Whether to evaluate the model after fitting.

  • evaluator (Evaluator) – The evaluator to use for evaluation.

Returns:

A tuple containing the updated model, the loss, the client index, and evaluation results.

Return type:

tuple