OmniReasoningBench / scripts /load_local.py
mjuicem's picture
Remove redundant fields: id, form, why_both_needed
8a34aee verified
Raw History Blame Contribute Delete
706 Bytes
#!/usr/bin/env python3
"""Load a local configuration; print one record's media references."""
import argparse
from pathlib import Path
from datasets import load_dataset
ap = argparse.ArgumentParser(description=__doc__)
ap.add_argument("--config", default="all")
args = ap.parse_args()
root = Path(__file__).resolve().parents[1]
data = load_dataset(str(root), args.config, split="test")
row = data[0]
print(f"Loaded {len(data):,} records")
if "video_sources" in row:
for video in row["video_sources"]:
print(video["url_kind"], video["url"])
for image in row["images"]:
print(root / image)
else:
print(root / row["video"])
if row["image"]:
print(root / row["image"])