From 36df881336ff21c39d84b27d1d39a1eedaf9b0ca Mon Sep 17 00:00:00 2001 From: Pierre-Alexandre Leziart <47817000+paLeziart@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:33:27 +0900 Subject: [PATCH] Remove duplicate lines from a2c_common.py --- rl_games/common/a2c_common.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rl_games/common/a2c_common.py b/rl_games/common/a2c_common.py index f9bd5a14..76eab4ce 100644 --- a/rl_games/common/a2c_common.py +++ b/rl_games/common/a2c_common.py @@ -240,13 +240,10 @@ def __init__(self, base_name, params): self.batch_size = self.horizon_length * self.num_actors * self.num_agents self.batch_size_envs = self.horizon_length * self.num_actors - assert(('minibatch_size_per_env' in self.config) or ('minibatch_size' in self.config)) - self.minibatch_size_per_env = self.config.get('minibatch_size_per_env', 0) - self.minibatch_size = self.config.get('minibatch_size', self.num_actors * self.minibatch_size_per_env) - # either minibatch_size_per_env or minibatch_size should be present in a config # if both are present, minibatch_size is used # otherwise minibatch_size_per_env is used minibatch_size_per_env is used to calculate minibatch_size + assert(('minibatch_size_per_env' in self.config) or ('minibatch_size' in self.config)) self.minibatch_size_per_env = self.config.get('minibatch_size_per_env', 0) self.minibatch_size = self.config.get('minibatch_size', self.num_actors * self.minibatch_size_per_env)