From 9db4e93fa032d36d637b9e34b618c16636e655e2 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 26 Jan 2024 13:01:36 +0100 Subject: [PATCH] Fix issue when policy_kwargs=None and TRPL used --- metastable_baselines2/trpl/trpl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/metastable_baselines2/trpl/trpl.py b/metastable_baselines2/trpl/trpl.py index edd3be8..83d78ab 100644 --- a/metastable_baselines2/trpl/trpl.py +++ b/metastable_baselines2/trpl/trpl.py @@ -116,6 +116,8 @@ class TRPL(BetterOnPolicyAlgorithm): self.projection_class = castProjection(projection_class) self.projection_kwargs = projection_kwargs self.projection = self.projection_class(**self.projection_kwargs) + if policy_kwargs is None: + policy_kwargs = {} policy_kwargs['policy_projection'] = self.projection super().__init__(