xuance
xuance copied to clipboard
MPE env not working.
FileNotFoundError Traceback (most recent call last)
2 frames /usr/local/lib/python3.10/dist-packages/xuanpolicy/common/common_tools.py in get_config(file_name) 22 23 def get_config(file_name): ---> 24 with open(file_name, "r") as f: 25 try: 26 config_dict = yaml.load(f, Loader=yaml.FullLoader)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/xuanpolicy/configs/maddpg/mpe/simple_spread.yaml'
Hi, you need to use "simple_spread_v3" instead of "simple_spread" for env_id. You can also create a new file named "simple_spread.yaml" and set hyperparameters according to "xuanpolicy/configs/maddpg/mpe/simple_spread_v3.yaml". Then get runner by
runner = xp.get_runner(method='maddpg', env='mpe', 'env_id'='simple_spread_v3', 'config_path'='your config path', is_test=False)
Thank you.
How can I visualize a trained model, and how can i specify the action to be discrete or continuous?
If you want to visualize the model, you can set "render: True" in xuanpolicy/configs/basic.yaml file. After training or testing the model, you can see the videos with tensorboard or wandb (by setting "logger: tensorboard" or "logger: wandb", respectively).
As for discrete or continuous actions, you can set the "continuous_action" as False or True in xuanpolicy/configs/xxx/xxx.yaml file. This parameter takes effect at line 12 of python file xuanpolicy/environment/pettingzoo/pettingzoo.env. (version 0.1.9)