File size: 1,046 Bytes
e0d4503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""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__")