Skip to content

Commit

Permalink
Update seed() of ToGymEnv to improve compatibility
Browse files Browse the repository at this point in the history
A lot of gym workflows tend to create sets of environments and seed them before use, and since most gym seed methods take an argument, most frameworks attempt to provide one, resulting in an error. Adding *args makes the ToGymEnv compatible without changing behavior.
  • Loading branch information
DavidSlayback committed Dec 31, 2020
1 parent ba5c1a1 commit fe14d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gym3/interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def render(self, mode="human"):
if mode == "rgb_array" and "rgb" in info:
return info["rgb"]

def seed(self):
def seed(self, *args):
print("Warning: seed ignored")

def close(self):
Expand Down

0 comments on commit fe14d67

Please sign in to comment.