Skip to content

Commit

Permalink
fix: remove manual seeding if seed is none.
Browse files Browse the repository at this point in the history
  • Loading branch information
KaleabTessera committed Nov 27, 2023
1 parent bc36bdf commit e49c5e1
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions supersuit/vector/markov_vector_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ def step_wait(self):
return self.step(self._saved_actions)

def reset(self, seed=None, options=None):
if seed is None:
# To ensure that subprocesses have different seeds,
# we still populate the seed variable when no argument is passed.
# Otherwise parallel vec env workers could have identical seeds (env could default to seed if no seed is passed)
# when reset is called as part of line 101.
seed = int(np.random.randint(0, np.iinfo(np.uint32).max, dtype=np.uint32))

# TODO: should this be changed to infos?
_observations, infos = self.par_env.reset(seed=seed, options=options)
observations = self.concat_obs(_observations)
Expand Down

0 comments on commit e49c5e1

Please sign in to comment.