Simulating Client Failure

Dear Flower Community

I am a beginner to the Flower Framework and I have a question regarding simulating client failure. I have been watching the FL Simulation with Flower video series where available client resources etc are defined and described in detail.

My question: it possible to also use the simulation framework to specify unreliability of a client – say, the client models an IoT device which runs out of battery and fails to submit the outcome of the fit function according to some probabilistic distribution?

Thank you

Ken

2 Likes

Hello @kjohnson, welcome!

One way to simulate client failure is to mock the client dropouts in the configure_fit method of the Strategy. For example, you can modify the FedAvg strategy slightly on these lines to something like clients = client_manager.sample(num_clients=sample_size-dropout_size, min_num_clients=min_num_clients). The dropout_size can be based on any dropout rate for each round, e.g. following a probabilistic distribution.

1 Like

Thank you! This is very helpful – we will try this out!