ClientConfig#

class fl_sim.nodes.ClientConfig(algorithm: str, optimizer: str, batch_size: int, num_epochs: int, lr: float, scheduler: dict | None = None, extra_observes: List[str] | None = None, verbose: int = 1, latency: float = 0.0, **kwargs: Any)[source]#

Bases: ReprMixin

Configs for the Client.

Parameters:
  • algorithm (str) – The algorithm name.

  • optimizer (str) – The name of the optimizer to solve the local (inner) problem.

  • batch_size (int) – The batch size.

  • num_epochs (int) – The number of epochs.

  • lr (float) – The learning rate.

  • scheduler (dict, optional) – The scheduler config. None for no scheduler, using constant learning rate.

  • extra_observes (List[str], optional) – Extra attributes to observe during training, which would be recorded in evaluated metrics, sent to the server, and written to the log file.

  • verbose (int, default 1) – The verbosity level.

  • latency (float, default 0.0) – The latency of the client. Not used in the current version, reserved for future use.

  • **kwargs (dict, optional) – The other arguments, will be set as attributes of the class.

extra_repr_keys() List[str][source]#

Extra keys for __repr__() and __str__().