Metadata#

class Metadata(run_id: int, message_id: str, src_node_id: int, dst_node_id: int, reply_to_message: str, group_id: str, ttl: float, message_type: str, partition_id: int | None = None)[source]#

Bases: object

A dataclass holding metadata associated with the current message.

Parameters:
  • run_id (int) – An identifier for the current run.

  • message_id (str) – An identifier for the current message.

  • src_node_id (int) – An identifier for the node sending this message.

  • dst_node_id (int) – An identifier for the node receiving this message.

  • reply_to_message (str) – An identifier for the message this message replies to.

  • group_id (str) – An identifier for grouping messages. In some settings, this is used as the FL round.

  • ttl (float) – Time-to-live for this message in seconds.

  • message_type (str) – A string that encodes the action to be executed on the receiving end.

  • partition_id (Optional[int]) – An identifier that can be used when loading a particular data partition for a ClientApp. Making use of this identifier is more relevant when conducting simulations.

Methods

Attributes

created_at

Unix timestamp when the message was created.

dst_node_id

An identifier for the node receiving this message.

group_id

An identifier for grouping messages.

message_id

An identifier for the current message.

message_type

A string that encodes the action to be executed on the receiving end.

partition_id

An identifier telling which data partition a ClientApp should use.

reply_to_message

An identifier for the message this message replies to.

run_id

An identifier for the current run.

src_node_id

An identifier for the node sending this message.

ttl

Time-to-live for this message.

property created_at: float#

Unix timestamp when the message was created.

property dst_node_id: int#

An identifier for the node receiving this message.

property group_id: str#

An identifier for grouping messages.

property message_id: str#

An identifier for the current message.

property message_type: str#

A string that encodes the action to be executed on the receiving end.

property partition_id: int | None#

An identifier telling which data partition a ClientApp should use.

property reply_to_message: str#

An identifier for the message this message replies to.

property run_id: int#

An identifier for the current run.

property src_node_id: int#

An identifier for the node sending this message.

property ttl: float#

Time-to-live for this message.