FedML icon indicating copy to clipboard operation
FedML copied to clipboard

code wrong??

Open NexusAkio opened this issue 4 years ago • 2 comments

image

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.

NexusAkio avatar Nov 01 '21 11:11 NexusAkio

The code is in the py file named FedAVGServerManager

NexusAkio avatar Nov 01 '21 11:11 NexusAkio

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

chaoyanghe avatar Nov 02 '21 04:11 chaoyanghe