vla / scripts /run_inference.sh
anhtld's picture
Initial commit: DoVLA-CIL codebase (h=16 breakthrough)
adc02fa verified
Raw
History Blame
649 Bytes
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
DEBUG_ROOT="${DOVLA_DEBUG_ROOT:-outputs/phase5_train_debug}"
DATASET_DIR="$DEBUG_ROOT/cil"
CHECKPOINT="$DEBUG_ROOT/run/best.pt"
OUT_PATH="${DOVLA_INFERENCE_OUT:-outputs/phase5_inference/inference.json}"
if [[ ! -f "$CHECKPOINT" || ! -f "$DATASET_DIR/manifest.json" ]]; then
DOVLA_DEBUG_ROOT="$DEBUG_ROOT" bash scripts/run_train_debug.sh
fi
python scripts/infer_toy_policy.py \
--dataset "$DATASET_DIR" \
--checkpoint "$CHECKPOINT" \
--out "$OUT_PATH" \
--device "${DOVLA_DEVICE:-auto}"
echo "inference output: $OUT_PATH"