History#

class History[源代码]#

基类:object

History class for training and/or evaluation metrics collection.

Methods

add_loss_centralized(server_round, loss)

Add one loss entry (from centralized evaluation).

add_loss_distributed(server_round, loss)

Add one loss entry (from distributed evaluation).

add_metrics_centralized(server_round, metrics)

Add metrics entries (from centralized evaluation).

add_metrics_distributed(server_round, metrics)

Add metrics entries (from distributed evaluation).

add_metrics_distributed_fit(server_round, ...)

Add metrics entries (from distributed fit).

add_loss_centralized(server_round: int, loss: float) None[源代码]#

Add one loss entry (from centralized evaluation).

add_loss_distributed(server_round: int, loss: float) None[源代码]#

Add one loss entry (from distributed evaluation).

add_metrics_centralized(server_round: int, metrics: Dict[str, bool | bytes | float | int | str]) None[源代码]#

Add metrics entries (from centralized evaluation).

add_metrics_distributed(server_round: int, metrics: Dict[str, bool | bytes | float | int | str]) None[源代码]#

Add metrics entries (from distributed evaluation).

add_metrics_distributed_fit(server_round: int, metrics: Dict[str, bool | bytes | float | int | str]) None[源代码]#

Add metrics entries (from distributed fit).