progress_probe_repro / path_detect.py
JackieMM's picture
Upload folder using huggingface_hub
6b11150 verified
Raw History Blame Contribute Delete
882 Bytes
"""Detect Himacon (/share) vs ACP (/data/share) data roots."""
from __future__ import annotations
import os
from pathlib import Path
def detect_share_roots() -> tuple[Path, Path]:
"""Return (label_root, video_root). Env overrides win."""
if os.environ.get("LABEL_ROOT") and os.environ.get("VIDEO_ROOT"):
return Path(os.environ["LABEL_ROOT"]), Path(os.environ["VIDEO_ROOT"])
candidates = [
(Path("/data/share"), "acp"),
(Path("/share"), "himacon"),
]
for share, _name in candidates:
label = share / "robotwin2.0-hard-cross-embodiment"
video = share / "robotwin2.0-hard"
if label.is_dir() and video.is_dir():
return label, video
raise FileNotFoundError(
"Cannot find robotwin share roots. Set LABEL_ROOT and VIDEO_ROOT, "
"or mount /data/share (ACP) or /share (Himacon)."
)