flower icon indicating copy to clipboard operation
flower copied to clipboard

Potential datatype mismatch in simulation_pytorch

Open VasundharaAgarwal opened this issue 3 years ago • 0 comments

What is your question?

Hi,

I noticed that in the simulation_pytorch example, we pass a function with return type CifarRayClient as the client_fn parameter in the call to start_simulation here. This seems at odds with the definition of start_simulation here because its client_fn parameter expects a function with return type flwr.client.Client.

I understand that this would be fine if flwr.client.NumPyClient, which CifarRayClient subclasses, was itself a subclass of flwr.client.Client, but this makes me believe it is not. Alternatively, had we been wrapping the returned CifarRayClient with NumPyClientWrapper here,, it would also have made sense.

The example does seem to execute without error, but I am not sure I understand why -- I would have expected a datatype mismatch error. I was hoping you could help me figure out where my misunderstanding lies.

VasundharaAgarwal avatar Apr 05 '22 18:04 VasundharaAgarwal