lerobot icon indicating copy to clipboard operation
lerobot copied to clipboard

Removing episodes from LeRobotDataset

Open andlyu opened this issue 11 months ago • 4 comments

Hi, thanks for building this. It's great.

Is there a way to easily remove episodes from a dataset. I had a decent amount of diversity in my episodes, and wanted to reduce it, so I had to remove ~1/2 of the episodes. Rather than rerecording them, I wanted to remove specified episodes (lets say all even episodes). Is there an easy way to do this? I'de tried just removing them from the episodes.jsonl file, but it seemed to load all of the episodes, and also deleting unwated episode videos/data and renaming the files through some issues when loading the datasets. Is there a better way to do this?

andlyu avatar Jan 13 '25 01:01 andlyu

I am also wondering if there is a quick way to remove specific episodes from a dataset?

The-Michael-Chen avatar Mar 09 '25 22:03 The-Michael-Chen

I'de seen it's possible to do somethign like this:

        dataset = LeRobotDataset(
            cfg.repo_id, # username/dataset_name
            root=cfg.root, # Can be None
            episodes=range(0,9)
        )

andlyu avatar Mar 28 '25 04:03 andlyu

@andlyu how did you end up doing this?

tlpss avatar Mar 28 '25 12:03 tlpss

FYI: implemented in #831

tlpss avatar Mar 31 '25 12:03 tlpss

This issue has been automatically marked as stale because it has not had recent activity (6 months). It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 09 '25 02:10 github-actions[bot]

This was fixed with lerobot dataset edit tools: https://huggingface.co/docs/lerobot/en/using_dataset_tools#delete-episodes

jadechoghari avatar Oct 17 '25 12:10 jadechoghari