File size: 404 Bytes
f972106 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | # patch_lerobot_meta.py
import sys
from pathlib import Path
import pyarrow.parquet as pq
for path in Path(sys.argv[1]).rglob("*.parquet"):
table = pq.read_table(path)
meta = dict(table.schema.metadata or {})
meta.pop(b"huggingface", None)
tmp = path.with_suffix(".tmp")
pq.write_table(table.replace_schema_metadata(meta or None), tmp)
print("fixing ", path)
tmp.replace(path) |