p2pfl.communication.commands.message.pre_send_model_command moduleΒΆ

PRE_SEND_MODEL command.

class p2pfl.communication.commands.message.pre_send_model_command.PreSendModelCommand(node_state)[source]ΒΆ

Bases: Command

Command used to notify a recipient node before a model is actually sent.

Parameters:

node_state (NodeState)

execute(source, round, *args, **kwargs)[source]ΒΆ

Execute the command.

Parameters:
  • source (str)

  • round (int)

Return type:

str | None

static get_name()[source]ΒΆ

Get the command name.

Return type:

str

static remove_hashed(node_state, cmd, hashes, round)[source]ΒΆ

Remove hashes from sending_models.

Parameters:
  • node_state (NodeState)

  • cmd (str)

  • hashes (list[str])

  • round (int)

Return type:

None