Skip to content

Commit

Permalink
Remove duplicate lines from a2c_common.py (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
paLeziart authored Sep 29, 2024
1 parent 0ed7c3a commit 90af59b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rl_games/common/a2c_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 90af59b

Please sign in to comment.