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()