Debugging Flower

Hello everyone,
I am new to Flower and I am wondering what the best way to debug a simulation is. I have tried using the PyCharm debugger but couldn’t get it to work with the “flwr run” command.
I am thankful for any suggestions.
Thanks in advance!

1 Like

Hello @lukasbloemer and welcome!

I try to implement dummy code in certain sections to test whether it’s running correctly. For instance, I might replace the fit method in my NumPyClient like so:

def fit(self, parameters, config)
    return np.ones((1, 1)), 1, {}

to check that the ClientApp calls fit() correctly. Then, I’ll swap out other parts to narrow down the bug.

I’d also reduce the clients to 2 (if possible) and set 1 FL round to simplify the debugging process.

Thanks! So there is no way for me to use a debugger and breakpoints?