Skip to content

Commit bfa8752

Browse files
committed
chore(policy): parameterize openvla-oft repo path (env/arg, no hardcoded /home)
1 parent a318bb0 commit bfa8752

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

scripts/policy/bridge_policy_server.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from __future__ import annotations
2323

2424
import argparse
25+
import os
2526
import pickle
2627
import socket
2728
import struct
@@ -222,7 +223,13 @@ def process(action):
222223
ap.add_argument("--ckpt", required=True)
223224
ap.add_argument("--port", type=int, default=5555)
224225
ap.add_argument("--quant", choices=["none", "8bit", "4bit"], default="none")
225-
ap.add_argument("--repo", default="/home/ghr/projects/robotwin/policy/openvla-oft")
226+
ap.add_argument(
227+
"--repo",
228+
default=os.environ.get("OPENVLA_OFT_REPO", ""),
229+
help="path to a local openvla-oft checkout (or set $OPENVLA_OFT_REPO)",
230+
)
226231
ARGS = ap.parse_args()
232+
if not ARGS.repo:
233+
raise SystemExit("--repo (or $OPENVLA_OFT_REPO) must point to a local openvla-oft checkout")
227234
sys.path.insert(0, ARGS.repo)
228235
raise SystemExit(main())

scripts/policy/run_openvla_eval.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
# setsid nohup bash scripts/policy/run_openvla_eval.sh > .../launcher.log 2>&1 < /dev/null &
99
set -u
1010

11-
RVLIB=/home/ghr/projects/RoboVerse/RoboVerse-libero
12-
OVREPO=/home/ghr/projects/robotwin/policy/openvla-oft
11+
# Local-dev launcher: override these for your machine (or export before running).
12+
RVLIB=${RVLIB:-$(cd "$(dirname "$0")/../.." && pwd)}
13+
OVREPO=${OPENVLA_OFT_REPO:-/path/to/openvla-oft}
1314
CKPT=$RVLIB/third_party/ckpt/openvla-oft-libero-plus
1415
SRV_LOG=$RVLIB/third_party/ckpt/bf16_server.log
1516
RES_LOG=$RVLIB/third_party/ckpt/openvla_eval_result.log

0 commit comments

Comments
 (0)