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

cannot train ma-gym environment with IQL #204

Open
Nafisanaznin opened this issue Dec 3, 2023 · 6 comments
Open

cannot train ma-gym environment with IQL #204

Nafisanaznin opened this issue Dec 3, 2023 · 6 comments
Assignees
Labels
question Further information is requested

Comments

@Nafisanaznin
Copy link

Hello there!
I am trying to train environments with IQL. But I think I am doing something wrong. The add_new_env.py file utilizes ma-gym environment and trains that with mappo. But when I write iql instead of mappo it doesn't work. I have tried to solve it but wasn't able to. I think there is something I am missing.
Thanks in advance.

@Theohhhu Theohhhu self-assigned this Dec 3, 2023
@Theohhhu Theohhhu added the question Further information is requested label Dec 3, 2023
@Theohhhu
Copy link
Collaborator

Theohhhu commented Dec 3, 2023

Could you please provide me with the complete error tracing log?

@Nafisanaznin
Copy link
Author

sure. I am running the add_new_env.py file. And I have replaced mappo with iql. And the error log is the following,
erro1
error2
error3

@Aequatio-Space
Copy link

I met a similar issue. To solve it, import a different ENV_REGISTRY
from marllib.envs.global_reward_env import COOP_ENV_REGISTRY as ENV_REGISTRY
instead of
from marllib.envs.base_env import ENV_REGISTRY

This Is because IQL algorithm is a (fake) VD network that uses run_vd.py to run, when it imports the ENV_REGISTRY, it comes from global_reward_env.

from marllib.envs.global_reward_env import COOP_ENV_REGISTRY as ENV_REGISTRY

In this add_new_env.py however, the ENV_REGISTRY comes from base_env.

from marllib.envs.base_env import ENV_REGISTRY

@Nafisanaznin
Copy link
Author

Thank you very much for your reply. But for some reason after replacing that line its telling me that my environment is not registered. Do I have to change something in my config file? Thanks in advance.

@Aequatio-Space
Copy link

Aequatio-Space commented Dec 19, 2023

Thank you very much for your reply. But for some reason after replacing that line its telling me that my environment is not registered. Do I have to change something in my config file? Thanks in advance.

You can try to register both environment in the registries (base_env and global_reward_env). Also, If you can kindly provide the specific error screenshot you have encountered, I may get a better understanding of what's going on :)

@Nafisanaznin
Copy link
Author

I solved it afterwards. I had to change the init.py file in the marl folder. I had to make the ENV_REGISTRY as COOP_ENV_REGISTRY. After that it worked. Thanks for your help though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants