You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a bug that I fixed by taking a look at the other onpolicy code that you have. In shared/mpe_runner.py in def eval() almost at the end of the function:
eval_episode_rewards=np.array(eval_episode_rewards)
eval_env_infos= {}
eval_env_infos['eval_average_episode_rewards'] =np.sum(np.array(eval_episode_rewards), axis=0)
# print("eval average episode rewards of agent: " + str(eval_average_episode_rewards))
The eval_average_episode_rewards is not defined and code will exit with error. Instead I used:
print("eval average episode rewards of agent: "+str(np.mean(eval_env_infos['eval_average_episode_rewards'])))
This is different than in separated/mpe_runner.py:
eval_train_infos= []
foragent_idinrange(self.num_agents):
eval_average_episode_rewards=np.mean(np.sum(eval_episode_rewards[:, :, agent_id], axis=0))
eval_train_infos.append({'eval_average_episode_rewards': eval_average_episode_rewards})
print("eval average episode rewards of agent%i: "%agent_id+str(eval_average_episode_rewards))
but i guess the logic is that in the shared case agent1 and agent2 are the same so the average reward between their performance is reasonable.
The text was updated successfully, but these errors were encountered:
This is a bug that I fixed by taking a look at the other onpolicy code that you have. In
shared/mpe_runner.py
indef eval()
almost at the end of the function:The
eval_average_episode_rewards
is not defined and code will exit with error. Instead I used:This is different than in separated/mpe_runner.py:
but i guess the logic is that in the shared case agent1 and agent2 are the same so the average reward between their performance is reasonable.
The text was updated successfully, but these errors were encountered: