From 53505a80adb11a69848e6a1858c3a599e28f1c6f Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Tue, 23 Jan 2024 18:32:22 +0100 Subject: [PATCH] Another issue with clip_range=None --- metastable_baselines2/trpl/trpl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metastable_baselines2/trpl/trpl.py b/metastable_baselines2/trpl/trpl.py index 18e5104..539e38e 100644 --- a/metastable_baselines2/trpl/trpl.py +++ b/metastable_baselines2/trpl/trpl.py @@ -330,7 +330,8 @@ class TRPL(BetterOnPolicyAlgorithm): self.logger.record("train/std", th.exp(self.policy.log_std).mean().item()) self.logger.record("train/n_updates", self._n_updates, exclude="tensorboard") - self.logger.record("train/clip_range", clip_range) + if self.clip_range is not None: + self.logger.record("train/clip_range", clip_range) if self.clip_range_vf is not None: self.logger.record("train/clip_range_vf", clip_range_vf)