aailabkaist / LAGMA

(Official) PyTorch implementation for LAGMA: LAtent Goal-guided Multi-Agent Reinforcement Learning (ICML 2024)
Apache License 2.0
16 stars 2 forks source link

KeyError: 'battle_won' #5

Open Isaac009 opened 5 months ago

Isaac009 commented 5 months ago

Hello there,

I'm trying to run the following command but got an error: python3 LAGMA_v0_release/src/main.py --config=lagma_sc2 --env-config=sc2 with env_args.map_name=5m_vs_6m

This is the error: File "/home/jupyter-isack/Documents/LAGMA_v0_release/src/runners/episode_runner.py", line 149, in run "flag_win": [(bool(env_info['battle_won']),)], KeyError: 'battle_won'

I will appreciate any help I can get, thank you.

HyunghoNa commented 4 months ago

Sorry for the late reply. This error occurs when battle_won flag is not properly defined throughout the training. starcraft_LAGMA.py in the uploaded code resolved this problem. Please make sure to use starcraft_LAGMA.py instead of original starcraft.py Thanks.

whywhy19i commented 1 month ago

I did not find the two files you mentioned in the code directory, and I encountered this error as well. I would greatly appreciate it if you could provide me with a solution

HyunghoNa commented 1 month ago

Please see the file (starcraft2_LAGMA.py) in the following path: https://github.com/aailabkaist/LAGMA/tree/lagma_master/LAGMA_smac_env/smac/env/starcraft2

If you already installed pymarl with the original code, please check whether init.py designates the correct path for starcraft2_LAGMA as in https://github.com/aailabkaist/LAGMA/blob/lagma_master/LAGMA_smac_env/smac/env/__init__.py

Thanks.