From 1aab03a13466687c400358c93888bfa93f51270b Mon Sep 17 00:00:00 2001 From: AlejandroCN7 Date: Tue, 2 Jul 2024 11:27:50 +0000 Subject: [PATCH] Automated format fixes (autopep8 + isort) --- sinergym/utils/callbacks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sinergym/utils/callbacks.py b/sinergym/utils/callbacks.py index 81aa5c326..bf0a91cda 100644 --- a/sinergym/utils/callbacks.py +++ b/sinergym/utils/callbacks.py @@ -2,6 +2,7 @@ import os import warnings +from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Union import gymnasium as gym @@ -13,7 +14,6 @@ from sinergym.utils.evaluation import evaluate_policy from sinergym.utils.wrappers import LoggerWrapper, NormalizeObservation -from copy import deepcopy class LoggerCallback(BaseCallback): @@ -443,9 +443,9 @@ def _on_step(self) -> bool: if self.verbose >= 1: print(f"Eval num_timesteps={self.num_timesteps}, " f"episode_reward={ - cumulative_reward:.2f} +/- {std_cumulative_reward:.2f}") + cumulative_reward: .2f} + /- {std_cumulative_reward: .2f}") print(f"Episode length: { - mean_ep_length:.2f} +/- {std_ep_length:.2f}") + mean_ep_length: .2f} + /- {std_ep_length: .2f}") # Add to current Logger (our custom metrics) for key, metric in self.evaluation_metrics.items(): self.logger.record('eval/' + key, metric)