Per-episode `data/file_index` / `data/chunk_index` metadata points at the wrong parquet files
Hi — while working with this dataset through lerobot (v3.0 dataset format, lerobot 0.5.2) I found that the per-episode file-location metadata in meta/episodes is inconsistent with where episode rows actually live in data/.
Reproduction:
import pandas as pd
from lerobot.datasets.lerobot_dataset import LeRobotDataset
ds = LeRobotDataset("HuggingFaceVLA/libero")
ep = 807 # first episode of the libero_object suite; many episodes are affected
row = ds.meta.episodes[ep]
print(row["data/chunk_index"], row["data/file_index"])
# -> chunk 0, file 37
df = pd.read_parquet(ds.root / "data/chunk-000/file-037.parquet", columns=["episode_index"])
print(sorted(set(df["episode_index"])))
# -> [90, 91, 92] — episode 807 is not in the file its metadata points to
# scanning data/ for episode 807's rows finds them in file-211 instead
What is still consistent: the global dataset_from_index / dataset_to_index values in meta/episodes are correct (frame windows line up with the concatenated data parquets, and the video pathway matches — I verified frames visually against task strings). So ordinary training/loading through LeRobotDataset works fine.
What breaks: anything that trusts the per-episode file pointers. lerobot's get_data_file_path() returns the wrong file, and dataset_tools.delete_episodes() crashes (KeyError in _copy_and_reindex_episodes_metadata) — and could silently corrupt output on datasets where the mismatch doesn't happen to crash. Episode-editing workflows on this dataset are effectively unusable until the metadata is regenerated.
Workaround for anyone hitting this: ignore the file-index columns and locate episodes by scanning the parquets' own episode_index column (or use the global from/to indices), e.g.:
for f in sorted((ds.root / "data").rglob("*.parquet")):
eps = set(pd.read_parquet(f, columns=["episode_index"])["episode_index"])
if ep in eps:
print(f) # the file that actually contains the episode
Would it be possible to regenerate the data/file_index / data/chunk_index columns in meta/episodes from the actual parquet contents? Happy to provide more examples of affected episodes if useful. Thanks for publishing the dataset!