Skip to content

Commit

Permalink
Fix episode chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
aliberts committed Oct 22, 2024
1 parent c3c0141 commit 9dca233
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lerobot/common/datasets/lerobot_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@ def get_video_file_path(self, ep_index: int, vid_key: str) -> Path:
return Path(fpath)

def get_episode_chunk(self, ep_index: int) -> int:
ep_chunk = ep_index // self.chunks_size
if ep_index > 0 and ep_index % self.chunks_size == 0:
ep_chunk -= 1
return ep_chunk
return ep_index // self.chunks_size

@property
def data_path(self) -> str:
Expand Down

0 comments on commit 9dca233

Please sign in to comment.