From 8d08f972afb600d3e995dfdb9a4776a1962d68c0 Mon Sep 17 00:00:00 2001 From: Michel Aractingi Date: Mon, 9 Dec 2024 11:08:36 +0100 Subject: [PATCH] Update lerobot/scripts/eval_robot.py Co-authored-by: Yoel --- lerobot/scripts/eval_robot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lerobot/scripts/eval_robot.py b/lerobot/scripts/eval_robot.py index 3185688b6..e164a20f4 100644 --- a/lerobot/scripts/eval_robot.py +++ b/lerobot/scripts/eval_robot.py @@ -242,9 +242,9 @@ def eval_policy( ) ], "aggregated": { - "avg_sum_reward": float(np.nanmean(sum_rewards[:n_episodes])), - "avg_max_reward": float(np.nanmean(max_rewards[:n_episodes])), - "pc_success": float(np.mean(successes) * 100), + "avg_sum_reward": float(np.nanmean(torch.cat(sum_rewards[:n_episodes]))), + "avg_max_reward": float(np.nanmean(torch.cat(max_rewards[:n_episodes]))), + "pc_success": float(np.nanmean(torch.cat(successes[:n_episodes])) * 100), "eval_s": time.time() - start_eval, "eval_ep_s": (time.time() - start_eval) / n_episodes, },