Fix: Crash when no dist_kwargs defined
This commit is contained in:
parent
8f66a34c29
commit
66b8d21398
@ -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__(
|
||||
|
Loading…
Reference in New Issue
Block a user