Inside the function _check_agents() it may happen that n_agents equals 0 and therefore triggers the exception. It is not clear to me yet what causes this bug.
To reproduce it, I have to run a lot of episodes to eventually stumble on this behavior. If I train my PPO agent using 16 environment instances, I get this exception very frequently. If I comment out that exception, my training program keeps running without further issues from the first sight. I cannot state yet that there are no side effects to this potential fix.
edit: This happens during the last step right on episode termination.
edit 2: I think the solution is to use len(terminal_info) instead of len(info) upon the step at episode termination.
Hi @awjuliani
I came across another bug.
Inside the function _check_agents() it may happen that
n_agents
equals 0 and therefore triggers the exception. It is not clear to me yet what causes this bug.To reproduce it, I have to run a lot of episodes to eventually stumble on this behavior. If I train my PPO agent using 16 environment instances, I get this exception very frequently. If I comment out that exception, my training program keeps running without further issues from the first sight. I cannot state yet that there are no side effects to this potential fix.
edit: This happens during the last step right on episode termination.
edit 2: I think the solution is to use len(terminal_info) instead of len(info) upon the step at episode termination.
edit 3: Created pull request.