Skip to content

fednova_server

FedNovaServer(num_clients, total_epoch)

Bases: strategy_server.StrategyServer

Implement the strategy of fednova on server side.

Attributes:

Name Type Description
num_clients int

client number

total_epoch int

the epoch number of client trainning

_clients_samples dict

samples of each client

_step_nums dict

step numbers for each client to optimize its model

Source code in iflearner/business/homo/strategy/fednova_server.py
def __init__(
    self,
    num_clients: int,
    total_epoch: int,
) -> None:
    super().__init__(num_clients, total_epoch)
    logger.info(f"num_clients: {self._num_clients}")

    self._clients_samples: dict = {}
    self._step_nums: dict = {}