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

MetricsLogger.log_dict(value_dict, *, key: str | Tuple[str, ...] | None = None, reduce: str | None = 'mean', window: int | float | None = None, ema_coeff: float | None = None, percentiles: List[int] | bool | None = None, clear_on_reduce: bool | None = -1, with_throughput: bool | None = None, throughput_ema_coeff: float | None = -1, reduce_per_index_on_aggregate: bool | None = -1) None[source]#

Logs all leafs of a possibly nested dict of values or Stats objects to this logger.

Traverses through all leafs of stats_dict and - if a path cannot be found in this logger yet, will add the Stats found at the leaf under that new key. If a path already exists, will merge the found leaf (Stats) with the ones already logged before. This way, stats_dict does NOT have to have the same structure as what has already been logged to self, but can be used to log values under new keys or nested key paths.

Passing a dict of stats objects allows you to merge dictionaries of stats objects that have been reduced by other, parallel components.

See MetricsLogger.log_value for more details on the arguments.