Fix: Crash when no dist_kwargs defined

This commit is contained in:
Dominik Moritz Roth 2024-03-09 13:51:38 +01:00
parent 8f66a34c29
commit 66b8d21398

View File

@ -92,6 +92,8 @@ class BetterOnPolicyAlgorithm(OnPolicyAlgorithm):
assert not rollout_buffer_class and not rollout_buffer_kwargs
if 'dist_kwargs' not in policy_kwargs:
policy_kwargs['dist_kwargs'] = {}
policy_kwargs['dist_kwargs']['n_envs'] = len(env.envs)
super().__init__(