FedML
FedML copied to clipboard
code wrong??

Obviously, client_sampling in line 33 returns a list with length client_num_per_round. Why is the loop size-1 in lines 38 and 39? In this way, the client_indexes[process_id-1] in line 39 will exceed the index range.
The code is in the py file named FedAVGServerManager
think about the following example, you will see why.
client_indexes = [2, 3, 7, 9]
server process id = 0
worker process id = 1, 2, 3, 4
size = 5