ray.rllib.utils.metrics.metrics_logger.MetricsLogger.aggregate#

MetricsLogger.aggregate(stats_dicts: List[Dict[str, Any]], *, key: str | Tuple[str, ...] | None = None) None[source]#

Merges n stats_dicts and logs result by merging on the time axis with existing stats.

The n stats_dicts should be generated by n parallel components such that merging their respective stats in parallel is meaningful. Stats can be aggregated at root or intermediate loggers. This will replace most internal values with the result of the merge. For exceptions, see the documentation of the individual stats classes merge methods.

Parameters:
  • stats_dicts – List of n stats dicts to be merged and then logged.

  • key – Optional top-level key under which to log all keys/key sequences found in the n stats_dicts.