flip.nvflare.metrics ==================== .. py:module:: flip.nvflare.metrics Functions --------- .. autoapisummary:: flip.nvflare.metrics.send_metrics_value flip.nvflare.metrics.handle_metrics_event Module Contents --------------- .. py:function:: send_metrics_value(label: str, value: float, fl_ctx: nvflare.apis.fl_context.FLContext, round: int | None = None, flip: flip.FLIP = FLIP()) -> None Sends a metric value to the Central Hub. If 'round' is provided, it will be included in the event data sent to the Central Hub. This allows the client to specify the x-value for the metric, which can be different from the global round number. If 'round' is not provided, the Central Hub will use the global round number as the x-value for the metric. :param label: The label of the metric. :param value: The value of the metric. :param fl_ctx: The federated learning context. :param round: The round number (default: None). .. py:function:: handle_metrics_event(event_data: nvflare.apis.shareable.Shareable, global_round: int, model_id: str, flip: flip.FLIP = FLIP()) -> None Use on the server to handle metrics data events raised by clients. :param event_data: The event data containing the metrics. :param global_round: The global round number (aka _current_round in scatter_and_gather scripts). :param model_id: The ID of the model.