nvflare.apis.aux_spec module

class MessageSendStatus(value)[source]

Bases: Enum

An enumeration.

FAILURE = 'failure'
OK = 'ok'
REPLY_ERROR = 'reply_error'
TIMEOUT = 'timeout'
aux_request_handle_func_signature(topic: str, request: Shareable, fl_ctx: FLContext) Shareable[source]

This is the signature of the message_handle_func.

The message_handle_func is a callback function that is registered to handle an aux request of a specific topic. Any implementation of a message_handle_func must follow this signature.

Example from the client runner:

engine.register_aux_message_handler(topic=ReservedTopic.END_RUN, message_handle_func=self._handle_end_run)

Parameters:
  • topic – topic of the message to be handled

  • request – the message data to be handled

  • fl_ctx – FL context

Returns: a Shareable response to the requester