Print warning on seeded metaworld reset

This commit is contained in:
Dominik Moritz Roth 2023-09-18 18:42:34 +02:00
parent ddd11c1783
commit 54e8ec4015

View File

@ -55,6 +55,7 @@ class FixMetaworldIgnoresSeedOnResetWrapper(gym.Wrapper, gym.utils.RecordConstru
gym.Wrapper.__init__(self, env) gym.Wrapper.__init__(self, env)
def reset(self, **kwargs): def reset(self, **kwargs):
print('[!] You just called .reset on a Metaworld env and supplied a seed. Metaworld curretly does not correctly implement seeding. Do not rely on deterministic behavior.')
if 'seed' in kwargs: if 'seed' in kwargs:
self.env.seed(kwargs['seed']) self.env.seed(kwargs['seed'])
return self.env.reset(**kwargs) return self.env.reset(**kwargs)