Download path_detect.py from JackieMM/progress_probe_repro: direct link, hf CLI and curl.
- Browser
- Download file 882 Bytes
-
https://huggingface.co/JackieMM/progress_probe_repro/resolve/main/path_detect.py
- Command line
-
hf download hf://JackieMM/progress_probe_repro/path_detect.py
-
curl -L -o path_detect.py https://huggingface.co/JackieMM/progress_probe_repro/resolve/main/path_detect.py
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)." | |
| ) | |