From ac0489a314be88cb2e08f69d0088f5e4ef77cb72 Mon Sep 17 00:00:00 2001 From: Ruggero Nocera <9341160+rogierz@users.noreply.github.com> Date: Thu, 26 Jan 2023 12:44:39 +0100 Subject: [PATCH] Added missing metrics when logging on tensorboard (#1298) --- stable_baselines3/common/logger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stable_baselines3/common/logger.py b/stable_baselines3/common/logger.py index 939d924957..2a730b4110 100644 --- a/stable_baselines3/common/logger.py +++ b/stable_baselines3/common/logger.py @@ -430,6 +430,8 @@ def write(self, key_values: Dict[str, Any], key_excluded: Dict[str, Union[str, T self.writer.file_writer.add_summary(experiment) self.writer.file_writer.add_summary(session_start_info) self.writer.file_writer.add_summary(session_end_info) + for k, v in value.metric_dict.items(): + self.writer.file_writer.add_scalar(k, v) # Flush the output to the file self.writer.flush()