Farama-Foundation / SuperSuit

A collection of wrappers for Gymnasium and PettingZoo environments (being merged into gymnasium.wrappers and pettingzoo.wrappers
Other
441 stars 56 forks source link

Fix render handling in subprocess event loop #209

Closed callumcurtis closed 1 year ago

callumcurtis commented 1 year ago

Currently, ProcConcatVec's subprocess event loop expects the render instruction to arrive as a tuple despite it being a single instruction. This causes the event loop to terminate with an error when the render instruction is received. This commit fixes the issue by moving the handler out of the tuple case.

This issue likely went unnoticed after updating the ProcConcatVec's render method to no longer accept parameters after Gymnasium 0.25.0.

Additionally, this commit returns the render result to the caller, no matter the render mode.

Finally, comp_infos was renamed to response to reflect that the piped response is not necessarily a compressed infos structure.

jjshoots commented 1 year ago

Hi, apologies for the late reply, but rebasing from master should fix tests.