Upload strict640x480-v2/code/wait_and_evaluate_all5.sh with huggingface_hub
Browse files
strict640x480-v2/code/wait_and_evaluate_all5.sh
CHANGED
|
@@ -5,6 +5,8 @@ set -euo pipefail
|
|
| 5 |
|
| 6 |
method="${1:?method: dino|stereo|moe|local_arca}"
|
| 7 |
gpu="${2:?physical GPU index}"
|
|
|
|
|
|
|
| 8 |
root=/workspace/RoboFactory/runs/strict640x480_v2
|
| 9 |
py=/workspace/venvs/robofactory-act/bin/python3.10
|
| 10 |
|
|
@@ -38,14 +40,28 @@ done
|
|
| 38 |
|
| 39 |
mkdir -p "$result_dir"
|
| 40 |
for task in lift_barrier camera_alignment three_robots_stack_cube long_pipeline_delivery take_photo; do
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
# A single worker owns the freed GPU, avoiding concurrent simulator processes
|
| 42 |
# silently contending for one policy replica. The seed file is frozen and
|
| 43 |
# verified by the evaluator before any rollout starts.
|
| 44 |
CUDA_VISIBLE_DEVICES="$gpu" "$py" -u "$evaluator" \
|
| 45 |
--checkpoint "$checkpoint" --task "$task" \
|
| 46 |
--seed-file "$root/heldout_seeds/$task.json" --episodes 100 \
|
| 47 |
-
--workers
|
| 48 |
-
--output "$
|
| 49 |
done
|
| 50 |
|
| 51 |
printf 'FORMAL_ALL5_EVALUATION_COMPLETE %s\n' "$method"
|
|
|
|
| 5 |
|
| 6 |
method="${1:?method: dino|stereo|moe|local_arca}"
|
| 7 |
gpu="${2:?physical GPU index}"
|
| 8 |
+
skip_tasks=",${3:-},"
|
| 9 |
+
eval_workers="${EVAL_WORKERS:-1}"
|
| 10 |
root=/workspace/RoboFactory/runs/strict640x480_v2
|
| 11 |
py=/workspace/venvs/robofactory-act/bin/python3.10
|
| 12 |
|
|
|
|
| 40 |
|
| 41 |
mkdir -p "$result_dir"
|
| 42 |
for task in lift_barrier camera_alignment three_robots_stack_cube long_pipeline_delivery take_photo; do
|
| 43 |
+
case "$skip_tasks" in *",$task,"*) echo "SKIP_ASSIGNED_TASK $method $task"; continue;; esac
|
| 44 |
+
result="$result_dir/eval_${task}.json"
|
| 45 |
+
# A parallel worker may have already completed this exact frozen protocol on
|
| 46 |
+
# another freed GPU. Reuse only a complete 100-episode JSON; never treat a
|
| 47 |
+
# partial file as valid.
|
| 48 |
+
if [[ -s "$result" ]] && "$py" - "$result" <<'PY'
|
| 49 |
+
import json, sys
|
| 50 |
+
r = json.load(open(sys.argv[1], encoding="utf-8"))
|
| 51 |
+
raise SystemExit(0 if r.get("episodes") == 100 and len(r.get("rows", [])) == 100 else 1)
|
| 52 |
+
PY
|
| 53 |
+
then
|
| 54 |
+
echo "REUSE_FORMAL_EVAL $method $task"
|
| 55 |
+
continue
|
| 56 |
+
fi
|
| 57 |
# A single worker owns the freed GPU, avoiding concurrent simulator processes
|
| 58 |
# silently contending for one policy replica. The seed file is frozen and
|
| 59 |
# verified by the evaluator before any rollout starts.
|
| 60 |
CUDA_VISIBLE_DEVICES="$gpu" "$py" -u "$evaluator" \
|
| 61 |
--checkpoint "$checkpoint" --task "$task" \
|
| 62 |
--seed-file "$root/heldout_seeds/$task.json" --episodes 100 \
|
| 63 |
+
--workers "$eval_workers" --devices 0 --max-steps 1500 \
|
| 64 |
+
--output "$result"
|
| 65 |
done
|
| 66 |
|
| 67 |
printf 'FORMAL_ALL5_EVALUATION_COMPLETE %s\n' "$method"
|