From 90af59b858943672d64341dc9c36910b7a6cbb96 Mon Sep 17 00:00:00 2001 From: paLeziart <47817000+paLeziart@users.noreply.github.com> Date: Mon, 30 Sep 2024 07:05:01 +0900 Subject: [PATCH] Remove duplicate lines from a2c_common.py (#288) --- 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 e083b0b5..54a5cda1 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)