flip.flower.metrics =================== .. py:module:: flip.flower.metrics .. autoapi-nested-parse:: Flower metrics utilities — mirrors flip.nvflare.metrics for the Flower framework. In Flower, clients return metrics in their reply Message via MetricRecord. The server-side strategy receives these in aggregate_train / aggregate_evaluate and should call handle_client_metrics to forward them to the Central Hub. Only the fl-server should import from this module — it forwards to the Central Hub using credentials that must never reach the fl-client containers. Usage (server-side, in a FedAvg strategy subclass): from flip.flower.metrics import handle_client_metrics, handle_client_exception def aggregate_train(self, server_round, replies): for msg in replies: handle_client_metrics(msg, server_round, self.model_id, self.flip) handle_client_exception(msg, self.model_id, self.flip) return super().aggregate_train(server_round, replies) Functions --------- .. autoapisummary:: flip.flower.metrics.handle_client_metrics flip.flower.metrics.handle_client_exception Module Contents --------------- .. py:function:: handle_client_metrics(msg: flwr.common.message.Message, server_round: int, model_id: str, flip: flip.FLIP = FLIP()) -> None Forward per-client metrics from a Flower reply Message to the Central Hub. Extracts all numeric metrics from the client's MetricRecord and sends each one to the Central Hub via flip.send_metrics. The metric label is converted to uppercase to match the FLIP convention (e.g. "train_loss" -> "TRAIN_LOSS"). Per-epoch metric keys following the "