Skip to content

Commit

Permalink
Compute aggregated stats during save_episode
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts committed Feb 14, 2025
1 parent 7c144fe commit 5ce8756
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lerobot/common/datasets/lerobot_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def save_episode(
write_episode(episode_dict, self.root)

self.episodes_stats[episode_index] = episode_stats
self.stats = aggregate_stats([self.stats, episode_stats]) if self.stats else episode_stats
write_episode_stats(episode_index, episode_stats, self.root)

def write_video_info(self) -> None:
Expand Down

0 comments on commit 5ce8756

Please sign in to comment.