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

Can't run examples/pettingzoo/sb3_train.py #269

Open
ZzzihaoGuo opened this issue Oct 30, 2024 · 0 comments
Open

Can't run examples/pettingzoo/sb3_train.py #269

ZzzihaoGuo opened this issue Oct 30, 2024 · 0 comments

Comments

@ZzzihaoGuo
Copy link

Hi,
I installed the environment according to the examples/requirements.txt, but an error occurred.
stable_baselines3 2.3.2 SuperSuit 3.7.2 PettingZoo 1.22.3

Traceback (most recent call last):
File "/root/autodl-tmp/Benchmarking-Meltingpot/examples/pettingzoo/sb3_train.py", line 29, in
import supersuit as ss
File "/root/miniconda3/envs/mp/lib/python3.10/site-packages/supersuit/init.py", line 1, in
from supersuit.generic_wrappers import clip_actions_v0 # NOQA
File "/root/miniconda3/envs/mp/lib/python3.10/site-packages/supersuit/generic_wrappers/init.py", line 12, in
from .delay_observations import delay_observations_v0 # NOQA
File "/root/miniconda3/envs/mp/lib/python3.10/site-packages/supersuit/generic_wrappers/delay_observations.py", line 4, in
from .utils.shared_wrapper_util import shared_wrapper
File "/root/miniconda3/envs/mp/lib/python3.10/site-packages/supersuit/generic_wrappers/utils/shared_wrapper_util.py", line 4, in
from pettingzoo.utils import BaseParallelWrapper
ImportError: cannot import name 'BaseParallelWrapper' from 'pettingzoo.utils' (/root/miniconda3/envs/mp/lib/python3.10/site-packages/pettingzoo/utils/init.py)

I can solve the problem by installing lower versions of SuperSuit, stable_baselines3, and PettingZoo.
PettingZoo==1.14.0 stable_baselines3==2.4.0a7 SuperSuit==3.3.2
But When I run the code, It seems that multi-core CPUs and multiple environments have little effect. 12 CPUs and 12 envs almost have the same performance with 1 CPU and 1 env.
Could you please provide more complete requirements.txt?

By the way, I am trying to use sbx(sb3 + jax) to make the pettingzoo framework to be faster, I don't know whether you would do the similar work. Thank you so much.

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

No branches or pull requests

1 participant