Passing custom information from clients to servers

Hi,

I am working on a baseline where the clients have to communicate the gradients of the network (the way the gradients are calculated is irrelevant to the question) along with the updated model. Is there a recommended way of doing this? In my mind I have an extra set of NDArrays to return along with the model parameters in the client’s fit method.

I am sure that what I am describing is a common problem but couldn’t find the recommended way.

Thanks

1 Like

Hi @gxenos, thanks for your question.

FitRes.metrics is a free-form dict collected on the server. It only supports scalars/strings, so for NDArrays you can serialize (e.g., via numpy.save to bytes + base64) and unpack in a custom Strategy.

You could use this to communicate the gradients.

Best regards,

William

Thank you, I assumed that was the way to do it, just wanted to make sure.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.