-
Notifications
You must be signed in to change notification settings - Fork 40
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
No module named 'pettingzoo.utils.all_modules'` #41
Comments
Thanks for reporting this, I will look into reproducing it as soon as I am back to a computer. In the mean time a few things:
|
thanks a looooooot for your help, so the results of this vmas MPE and pettingzoo MPE tasks are the same ? i mean the settings are fully identical? |
The settings are not fully identical. VMAS MPE tries to be identical to the original repository, while PettingZoo has accumulated some differences over the years. To see what are the differences in a scenario, simply compare the VMAS MPE folder to the PettingZoo MPE folder You can also conpare the configuration files in benchmarl to see how the input params differ ( https://github.com/facebookresearch/BenchMARL/tree/main/benchmarl/conf/task/vmas and https://github.com/facebookresearch/BenchMARL/tree/main/benchmarl/conf/task/pettingzoo) |
Closing as inactive and I am not able to reproduce the pettingzoo error. Feel free to reopen and link error details if this still occours. |
Hi @matteobettini , I am starting to use the BenchMarl, congrats for the job, really impressive. This pettingZoo problem happened to me trying to use on windows when intalling pettinZoo[all], the problem is with the Atari envs when installing the multi-agent-ale-py, is not being able to build the library as required. In my case I needed to start to use the WSL with Ubuntu, install swig and cmake before install pettingZoo[all] and them everything works fine. The problem is in pettingZoo ( [https://github.com/Farama-Foundation/PettingZoo/issues/1072] ) and only happening with Atari envs instalation. However, despite not using Atari envs in benchMARL, when trying to load pettingZoo envs, classic envs are also loaded, so is not possible to only install MPE and SISL and use benchMARL with pettinZoo on windows. |
Thanks so much for pointing this out and linking the PettingZoo issue. I really wish a solution to Farama-Foundation/PettingZoo#1072 is found. On our side, my guess is that we are importing atari (even if not needed) here: from pettingzoo.utils.all_modules import all_environments and this imports all modules. In order to be able to import only the required module from pettingzoo, we would need to be able to make this call without being forced to import all dependencies. Or, in a less optimal alternative, at least be able to call @elliottower any case we can make it possible to obtain the map of pettingzoo tasks without having to import everything and incurring in the windows users issue? |
Hi @matteobettini, thanks for notifying me and raising this issue, I commented on the other thread but I will take a look into it. I can definitely add a mapping of environment name to module in each environments' init files like you say with mpe_environments, I think that is more ideal than my initial idea proposed on the other issue page (making it so you can import the all environments mapping even if you are missing a requirement), as that could lead to uncaught issues where people think they are iterating through all of the environments (or our CI is trying to) but they are not all found. |
Thanks @elliottower for the prompt response. Yes, having a dict per environment module seems doable and at that point the holy grail for me would be to allow people to obtain but i think that, for the current problem, also just the first solution would be enough for me to fix it |
What exactly do you mean by being able to obtain the Anyways, I've thrown up a PR to do what we discussed above, thanks again for bringing this up, feel free to take a look if you'd like. |
By the way I appreciate what you're doing with this repo, great to see some reproducibility and benchmarking in MARL. Hadn't actually seen TorchRL before now either, but that is amazing to see too, feel free to reach out to me again if there are any other issues that come up or feature requests which would make things easier for you guys. |
I am also unsure whether this is possible given the pettingzoo structure, but the idea is
Thanks! That is really nice to hear! I'll definitely reach out and coordinate in the future, so that we can provide the best pettingzoo benchmarking experience possible! |
Feel free to reach out via discord as well if you'd like by the way, my username is @b3arodactyl. I was thinking if there are any tutorials using PettingZoo we could add links to them on our site or an official tutorial if there is interest for that (see https://pettingzoo.farama.org/tutorials/agilerl/ or https://pettingzoo.farama.org/tutorials/rllib/ for example) Edit: and the lazy import you suggest does sound like it may be a useful feature, but I think it's best to keep things as they have been for consistency, and consistency with Gymnasium and other Farama projects. |
Yeah we have been thinking about a tutorial explaining turn-based multi-agent learning in torchrl and PettingZoo for a while with @vmoens If there is interest in that, I might invest some time in it in the future and let you know. |
That would be awesome, if you need any help looking at the writing copy or anything feel free to reach out. Anyways, this issue should be fixed, will make a new PZ release soon. |
I created a PR that should fix the issue pytorch/rl#1817. If any user that was having problems wants to test it, make sure you install the latest pettingzoo |
im kinda stuck
python version:3.9.16
torchrl version: 0.2.1
pettingzoo version: 1.24.2
benchmarl version: 1.0.0
i have this versions but when i try to run :python benchmarl/run.py algorithm=mappo task=pettingzoo/simple_spread i get wired errors like :
ModuleNotFoundError: No module named 'multi_agent_ale_py' and when i tried using pip install 'multi_agent_ale_py i get this error : Could not build wheels for multi_agent_ale_py, which is required to install pyproject.toml-based projects
thanks for help :(
The text was updated successfully, but these errors were encountered: