-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] SB3 breaks with gym==0.20.0 #573
Comments
Hello, Related to cyprienc@e7a48d2 and #572 EDIT: in the meantime, I would recommend sticking to gym v0.19 |
I found a hack, that should probably go to gym repo: from typing import Dict, Any
from gym.spaces import Space
def patch_setstate(self, state: Dict[str, Any]) -> None:
"""Restores pickled state."""
if "shape" in state:
state["_shape"] = state["shape"]
del state["shape"]
self.__dict__.update(state)
Space.__setstate__ = patch_setstate |
@araffin can you please create a PR for this? |
Fixed in openai/gym#2419 |
🐛 Bug
Stable-baselines3==1.2.0 breaks with gym==0.20.0
To Reproduce
Expected behavior
I believe the gym/spaces/space.py file has been changed in gym==0.20.0.
The code runs as expected for gym==0.18.0.
Checklist
The text was updated successfully, but these errors were encountered: