|View source on GitHub|
An abstract base class for metrics managers.
MetricManager is a utility to log metric data across a number of
rounds of some simulation.
update_metrics( round_num: int, metrics_to_append: Dict[str, Any] )
Updates the metrics manager with metrics for a given round.
This method updates the MetricsManager with a given nested structure of
metrics_to_append, at a given round number
method should only support strictly increasing, nonnegative round numbers,
but not necessarily contiguous round numbers.
For example, calling this method with
round_num = 3 then
round_num = 7
is acceptable, but calling the method with
round_num = 6 then
round_num = 6 (or anything less than 6) is not supported. he
must also be nonnegative, so
round_num = 0 is supported, but
round_num < 0 is not.
metrics_to_append can be any nested structure of tensors. The actual
metrics that are recorded are the leaves of this nested structure, with
names given by the path to the leaf.
A nonnegative integer representing the round number associated
||A nested structure of tensors.|