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

MPE and GRF examples not working #50

Open
ardian-selmonaj opened this issue Aug 2, 2024 · 3 comments
Open

MPE and GRF examples not working #50

ardian-selmonaj opened this issue Aug 2, 2024 · 3 comments

Comments

@ardian-selmonaj
Copy link

I am trying to run your examples of mpe_mappo and football_qmix but I am getting errors when purely running your examples.

For MAPPO MPE with simple_spread_v3:

File "venv_xuan/lib/python3.9/site-packages/xuance/torch/agents/agents_marl.py", line 45, in __init__ self.n_agents = config.n_agents AttributeError: 'Namespace' object has no attribute 'n_agents'

For QMIX GRF:
File "venv_xuan/lib/python3.9/site-packages/xuance/environment/__init__.py", line 29, in make_envs raise AttributeError(f"The vectorizer {config.vectorize} is not implemented.") AttributeError: The vectorizer Subproc_Football is not implemented.

I would highly appreciate your assistance! I have Python3.9 and gym 0.26.2.

@wenzhangliu
Copy link
Collaborator

I have tested and successfully run these two examples on my desktop. I believe the examples you tested are in the master branch, which is coded for the newest version of the master branch. I suggest you use the code in the stable master branch.

Additionally, I have released the latest version of XuanCe (v1.2.2) on PyPI today. You can try it again and post your feedback anytime.

@ardian-selmonaj
Copy link
Author

Hi, thank you for your help. I indeed had to use the stable version in order to make it run. However, I just installed the package with pip install xuance[torch], so in fact it should automatically install the stable version, or not? Because in the configs folder of the installed package I see more configurations than on the stable branch. In fact, the same as in the master branch.

@ardian-selmonaj
Copy link
Author

I still have an error for Robotic Warehouse env, even when I proceed exactly as in the stable version. See below.

File "/home/ardianselmonaj/Projects/MARL_World/xuan_qmix_rware.py", line 30, in <module> envs = make_envs(configs) # Make the environment. File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/xuance/environment/__init__.py", line 29, in make_envs raise AttributeError(f"The vectorizer {config.vectorize} is not implemented.") AttributeError: The vectorizer Dummy_RoboticWarehouse is not implemented.

When I try to change vectorize into SubprocVecMultiAgentEnv or DummyVecMultiAgentEnv, I get:

File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/xuance/environment/__init__.py", line 19, in _thunk return XuanCeMultiAgentEnvWrapper(REGISTRY_MULTI_AGENT_ENV[config.env_name](config)) File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/xuance/environment/multi_agent_env/robotic_warehouse.py", line 14, in __init__ self.env = gym.make(config.env_id) File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/gym/envs/registration.py", line 569, in make _check_version_exists(ns, name, version) File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/gym/envs/registration.py", line 219, in _check_version_exists _check_name_exists(ns, name) File "/home/ardianselmonaj/Projects/MARL_World/venv1/lib/python3.10/site-packages/gym/envs/registration.py", line 197, in _check_name_exists raise error.NameNotFound( gym.error.NameNotFound: Environment rware-tiny-2ag doesn't exist.

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

2 participants