Files
any4lerobot/ds_version_convert/v30_to_v21
FennMai 723bd71cf2 🐛 fix v30_to_v21 ArrowTypeError on pandas extension dtypes
`table.slice(...).to_pandas()` produces pandas ExtensionArrays for
`array[float32]` columns (e.g. `observation.states.end.orientation`)
on newer pandas/pyarrow combos, which then fail in
`pa.Table.from_pandas` inside `Dataset.from_pandas(...).to_parquet(...)`.

Skip the pandas round-trip and wrap the `pa.Table` slice in a
`Dataset` directly with `Dataset(episode_table).to_parquet(...)`.
This preserves the HuggingFace dataset metadata that `Dataset.to_parquet`
writes, while avoiding the ExtensionArray crash. No version pin on
datasets/pyarrow needed.

Closes #87
2026-04-30 07:03:03 +00:00
..
2025-12-03 12:53:59 +08:00

LeRobot Dataset v30 to v21

Get started

  1. Downgrade datasets:

    pip install "datasets<4.0.0"
    

    Need to downgrade datasets first since 4.0.0 introduces List and Column.

  2. Install v3.0 lerobot

    git clone https://github.com/huggingface/lerobot.git
    pip install -e .
    
  3. Run the converter:

    python convert_dataset_v30_to_v21.py \
        --repo-id=your_id \
        --root=your_local_dir