-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update sb3_vector_wrapper to fix compatibility issues #206
Conversation
@jjshoots @pseudo-rnd-thoughts |
@elliottower Could you update to master, I have added pre-commit and removed flake8 from CI hopefully removing your issue |
Just adding on to this, I'm not sure if adapting supersuit back to the |
They have a function to create a single env from pettingzoo or gymnasium but he said I should write a custom wrapper to do the vector envs, but I couldn’t get it to work. I could try to create a PR there but I don’t know the codebase that well and struggled to figure this out for 3+ days already, this was the only way I could get it working. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, in that case I think this wrapper is fine given Antonin's stance. Could you figure out the flake8 error on Py3.7? Then we can merge.
@jjshoots The issue with flake8 is that it requires python>=3.8, this is the reason why I added pre-commit as a replacement of running flake8 in the build ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elliottower Given Mark's response, I think you just need to update to master for tests to pass. After that, LGTM.
@elliottower After talking about @jjshoots some more, we are uncertain of this PR. The issue is that supersuit updated to gym v0.26 step api however sb3 has taken a long time to make the change. However this change looks to be happening soon, DLR-RM/stable-baselines3#780 |
Sounds good, thanks for looking into it. It seemed from prior comments that they weren’t going to move to the new API but if you think they will then I agree this PR is unnecessary. |
Fix: change step_wait() in SB3VecEnvWrapper to return
dones
rather thanterminations
andtruncations
, as SB3 internally usesdones
rather than gymnasium/pettingzoo'sterminations
andtruncations
.See DLR-RM/stable-baselines3#1327
and DLR-RM/stable-baselines3#1356