AsianPlayer/TriDrive / code /data /run_extract_pose_causal_routes.sh
AsianPlayer's picture
download
raw
1.3 kB
#!/usr/bin/env bash
# cwm3/data/run_extract_pose_causal_routes.sh — resumable loop for the route-level causal pose extraction (644 s12 routes).
# LOCK=1 (default): each chunk holds /tmp/s13_gpu.lock; MAX_MIN budget stops STARTING new routes (a single route can take up to
# ~10 min), so MAX_MIN=10 keeps every chunk <= ~22 min. LOCK=0: no lock (only when the benchmark showed the job is decode-bound).
# Exit 3 = work remaining -> loop; 0 = ALL_DONE; other -> wait 60 s and retry (finished routes are skipped).
set -u
PY=python
DIR="$(cd "$(dirname "$0")" && pwd)"; LOGD="$DIR/../results/pose_causal_routes/logs"; mkdir -p "$LOGD"
LOCK="${LOCK:-1}"; MAX_MIN="${MAX_MIN:-10}"; WORKERS="${WORKERS:-6}"; PAUSE="${PAUSE:-20}"
while true; do
LOG="$LOGD/chunk_$(date -u +%Y%m%dT%H%M%SZ).log"
if [ "$LOCK" = "1" ]; then
flock /tmp/s13_gpu.lock "$PY" "$DIR/extract_pose_causal_routes.py" --all --max-minutes "$MAX_MIN" --decode-workers "$WORKERS" >"$LOG" 2>&1
else
"$PY" "$DIR/extract_pose_causal_routes.py" --all --max-minutes "$MAX_MIN" --decode-workers "$WORKERS" >"$LOG" 2>&1
fi
rc=$?; tail -1 "$LOG"
if [ "$rc" -eq 0 ]; then echo "ALL_DONE $(date -u +%FT%TZ)"; break; fi
if [ "$rc" -ne 3 ]; then echo "chunk rc=$rc (see $LOG); retry in 60 s"; sleep 60; fi
sleep "$PAUSE"
done

Xet Storage Details

Size:
1.3 kB
·
Xet hash:
301b90b1b00a815142f30ecc076565b2cd8eca160d487b701c27148149c6c58a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.