Skip to content
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

fix render_mode attribute not being set by sb3 wrapper. #242

Closed
wants to merge 3 commits into from

Conversation

Butanium
Copy link
Contributor

@Butanium Butanium commented Jan 17, 2024

Also added a test to record video. This test currently creates 2 files in /tmp, should I remove them after the test or is that ok ?
Fix #241

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but this should be in a separate class or file, SB3 is does not officially support pettingzoo at all, even though it does work we can’t guarantee anything. RGB array rendering means it saves it as a numpy object, so we still want the existing test, but also testing that SB3 works is fine I suppose as well. I may make another PR though making these wrappers more similar to pettingzoo where they inherit all of the underlying env properties, rather than just the render mode and ones we specify.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so won't merge this one but rather merge your enhanced sb3 wrapper ?
Let me know if we should just close this and let me add the test to your PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly don't remember what I did with the SB3 wrapper, I think it's fine to test something with SB3 as you do here, but it needs to be in addition to the previous test, not replacing the previous one.

I will look into the changes Florian made to PettingZoo to fix the attributes inheritance and such, and see if it's possible to do here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok cool.
But I'm not replacing any tests here. The only one that was here was already commented because it fails. I updated the code to match the latest SS version but it still failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, hmm well in that case we should probably try to make that test not fail in an ideal world at least

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed but I think it is outside the scope of this PR as it is not related to the attribute erasing (see the below error message)

X connection to :0 broken (explicit kill or server shutdown).
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 88 requests (88 known processed) with 0 events remaining.
XIO:  fatal IO error 2 (No such file or directory) on X server ":0"
      after 88 requests (88 known processed) with 0 events remaining.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's bizarre... alright well fair enough I guess this is better than nothing

@elliottower
Copy link
Contributor

Could you run pre-commit hooks?

@elliottower
Copy link
Contributor

Also you'll need to add stable-baselines3 as a testing requirement

@elliottower
Copy link
Contributor

I made my own PR fixing these things so no worries (faster for me to do now and then merge it while I'm working today)

@Butanium
Copy link
Contributor Author

See #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Render mode attribute is erased by ss wrappers
2 participants