handle_train_message#

fedcausal.flower.lingam.handle_train_message(msg, context, loader)[source]#

Do this site’s part of a FedRCD round, for any method, and reply.

A one-round method asks once for the moment sums of the site’s data. The exact method’s messages carry a round: round 0 asks for the same sums, and every later round deflates the working matrix kept in context.state by the source and coefficients the server sent (x_j -= beta_j * x_s), drops the source column and asks for the sums of what is left.

Parameters:
msgMessage

The incoming message.

contextContext

This supernode’s context.

loaderPartitionLoader

Resolves this supernode’s dataset.

Returns:
Message

The mean and moment sums, the row count and, on the first round, the fingerprint of the variable names.