MCPcopy
hub / github.com/FedML-AI/FedML / server_aggregate

Method server_aggregate

python/examples/flow/fedavg/test_fedml_flow.py:66–77  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 return params
65
66 def server_aggregate(self):
67 logging.info("server_aggregate")
68 params = self.get_params()
69 model_params = params.get(Params.KEY_MODEL_PARAMS)
70 # logging.info("value1 = {}".format(value1))
71 self.round_idx += 1
72 self.client_count += 1
73 if self.client_count == self.client_num:
74 self.client_count = 0
75 params = Params()
76 params.add(Params.KEY_MODEL_PARAMS, model_params)
77 return params
78
79 def final_eval(self):
80 logging.info("final_eval")

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
addMethod · 0.95
ParamsClass · 0.90
infoMethod · 0.45
get_paramsMethod · 0.45

Tested by

no test coverage detected