From 83374a0f83a4664cc0618009b57c2d3196af6ba6 Mon Sep 17 00:00:00 2001 From: augmented168 <173481378+augmented168@users.noreply.github.com> Date: Tue, 9 Sep 2025 11:43:35 -0700 Subject: [PATCH] Fix TypeError in LeRobotDataset initialization when using --control.resume=true flag --- lerobot/common/datasets/lerobot_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lerobot/common/datasets/lerobot_dataset.py b/lerobot/common/datasets/lerobot_dataset.py index 29d91c152a..54d851dba8 100644 --- a/lerobot/common/datasets/lerobot_dataset.py +++ b/lerobot/common/datasets/lerobot_dataset.py @@ -557,8 +557,8 @@ def __init__( self.episode_data_index = get_episode_data_index(self.meta.episodes, self.episodes) # Check timestamps - timestamps = torch.stack(self.hf_dataset["timestamp"]).numpy() - episode_indices = torch.stack(self.hf_dataset["episode_index"]).numpy() + timestamps = torch.tensor(self.hf_dataset["timestamp"]).numpy() + episode_indices = torch.tensor(self.hf_dataset["episode_index"]).numpy() ep_data_index_np = {k: t.numpy() for k, t in self.episode_data_index.items()} check_timestamps_sync(timestamps, episode_indices, ep_data_index_np, self.fps, self.tolerance_s)