ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tf_agents.eval.metric_utils.compute_summaries

Compute metrics using policy on the environment and logs summaries.

metrics List of metrics to compute.
environment py_environment instance.
policy py_policy instance used to step the environment. A tf_policy can be used in_eager_mode.
num_episodes Number of episodes to compute the metrics over.
global_step An optional global step for summaries.
tf_summaries If True, write TF summaries for each computed metric.
log If True, log computed metrics.
callback If provided, this function is called with (computed_metrics, global_step).

A dictionary of results {metric_name: metric_value}