GNN_Disassembly_WorldModel / examples /04_materialize_per_frame.py
ChangChrisLiu's picture
Super-squash branch 'main' using huggingface_hub
e0d4503
Raw History Blame Contribute Delete
1.05 kB
"""Thin wrapper around tools/hanoi_pipeline/scripts/materialize_per_frame_graphs.py.
Kept in examples/ so `python examples/04_materialize_per_frame.py` works
side-by-side with the other example entry points.
Usage (from the dataset repo root, after `hf download`):
python examples/04_materialize_per_frame.py \\
hanoi/session_hanoi_0415_190808/episode_00 \\
--out ./per_frame_graphs \\
--variant with_robot_state \\
--also-json
"""
from __future__ import annotations
import sys
import runpy
from pathlib import Path
_REPO_ROOT = Path(__file__).resolve().parent.parent
_SCRIPT = _REPO_ROOT / "tools" / "hanoi_pipeline" / "scripts" / "materialize_per_frame_graphs.py"
if not _SCRIPT.is_file():
sys.exit(
f"ERROR: expected {_SCRIPT} to exist after `hf download`. "
"Did you download the full dataset (including tools/)?"
)
# Hand argv off to the real script. It does its own repo-root sys.path injection.
sys.argv[0] = str(_SCRIPT)
runpy.run_path(str(_SCRIPT), run_name="__main__")