diff --git a/fl4health/server/client_level_dp_fed_avg_server.py b/fl4health/server/client_level_dp_fed_avg_server.py index d730ffc6f..c4f6f1740 100644 --- a/fl4health/server/client_level_dp_fed_avg_server.py +++ b/fl4health/server/client_level_dp_fed_avg_server.py @@ -85,7 +85,7 @@ def fit(self, num_rounds: int, timeout: Optional[float]) -> History: def setup_privacy_accountant(self, sample_counts: List[int]) -> None: """ - Sets up FL Accountant and computes privacy loss based on class attributes and retrived sample counts + Sets up FL Accountant and computes privacy loss based on class attributes and retrieved sample counts Args: sample_counts (List[int]): These should be the total number of training examples fetched from all clients diff --git a/fl4health/server/instance_level_dp_server.py b/fl4health/server/instance_level_dp_server.py index 61eef97da..29d0ae92f 100644 --- a/fl4health/server/instance_level_dp_server.py +++ b/fl4health/server/instance_level_dp_server.py @@ -100,7 +100,7 @@ def fit(self, num_rounds: int, timeout: Optional[float]) -> History: def setup_privacy_accountant(self, sample_counts: List[int]) -> None: """ - Sets up FL Accountant and computes privacy loss based on class attributes and retrived sample counts + Sets up FL Accountant and computes privacy loss based on class attributes and retrieved sample counts Args: sample_counts (List[int]): These should be the total number of training examples fetched from all clients diff --git a/fl4health/server/scaffold_server.py b/fl4health/server/scaffold_server.py index 694dccc2c..eb414f75b 100644 --- a/fl4health/server/scaffold_server.py +++ b/fl4health/server/scaffold_server.py @@ -63,7 +63,7 @@ def _get_initial_parameters(self, timeout: Optional[float]) -> Parameters: Args: timeout (Optional[float]): If the server strategy object does not have a server-side initial parameters - unction defined, then one of the clients is polled and their model parameters are returned in order to + function defined, then one of the clients is polled and their model parameters are returned in order to initialize the models of all clients. Timeout defines how long to wait for a response. """ assert isinstance(self.strategy, Scaffold) diff --git a/fl4health/strategies/basic_fedavg.py b/fl4health/strategies/basic_fedavg.py index 42849898f..d86738e4e 100644 --- a/fl4health/strategies/basic_fedavg.py +++ b/fl4health/strategies/basic_fedavg.py @@ -57,6 +57,8 @@ def __init__( client sample counts. The second is that it allows users to Flower's standard sampling or use a custom sampling approach implemented in by a custom client manager. + FedAvg Paper: https://arxiv.org/abs/1602.05629 + Args: fraction_fit (float, optional): Fraction of clients used during training. In case `min_fit_clients` is larger than `fraction_fit * available_clients`, `min_fit_clients` will still be sampled. diff --git a/fl4health/strategies/scaffold.py b/fl4health/strategies/scaffold.py index d5a176038..f4ec69e37 100644 --- a/fl4health/strategies/scaffold.py +++ b/fl4health/strategies/scaffold.py @@ -122,7 +122,7 @@ def initialize_control_variates( Parameters: This quantity represents the initial values for the control variates for the server and on the client-side Raises: - ValueError: This error will be raised is neither a model nor initial control variates are provided + ValueError: This error will be raised if neither a model nor initial control variates are provided """ if initial_control_variates is not None: # If we've been provided with a set of initial control variates, we use those values