[RLLib] ParallelPettingZooEnv wrapper fails rllib.utils.check_env() #39453
Labels
bug
Something that is supposed to be working; but isn't
P1.5
Issues that will be fixed in a couple releases. It will be bumped once all P1s are cleared
rllib
RLlib related issues
rllib-env
rllib env related issues
rllib-multi-agent
An RLlib multi-agent related problem.
What happened + What you expected to happen
I would expect that using RLLib's own
ParallelPettingZooEnv
wrapper around a PettingZooParallelEnv
would pass RLLib's owncheck_env()
test. However, this is not the case. See the simple reproduction script below. The error output is copied below.Error output
Root Issue
The root issue for this error is that RLLib's
ParallelPettingZooEnv
wrapper does not adopt the so-called "preferred format" in RLLib's ownMultiAgentEnv
APIray/rllib/env/wrappers/pettingzoo_env.py
Lines 89 to 114 in 212cd04
Recommendations
Update the
ParallelPettingZooEnv
wrapper to use the preferred format.Add a unit test in test_pettingzoo_env.py to ensure that a wrapped PettingZoo passes RLLib's own
check_env()
function.Why this is important
As a creator of various multi-agent RL environments following the PettingZoo API, I would love to be able to use RLLib's
check_env()
function as a unit test / sanity check for my own environment to ensure that users can train RLLib algorithms on my environment. Ideally, I'd like the following to work:Implementing a new multi-agent RL environment:
Unit test
Versions / Dependencies
ray[rllib]==2.6.3
pettingzoo==1.22.3 (this is the latest version of pettingzoo that ray[rllib]==2.6.3 is compatible with)
Reproduction script
Run the following in any Jupyter notebook or Google Colab notebook:
Issue Severity
None
The text was updated successfully, but these errors were encountered: