Download scripts/run_full220_local.sh from ZenoNing/ConsDrive: direct link, hf CLI and curl.
- Browser
- Download file 2.8 kB
-
https://huggingface.co/ZenoNing/ConsDrive/resolve/main/scripts/run_full220_local.sh
- Command line
-
hf download hf://ZenoNing/ConsDrive/scripts/run_full220_local.sh
-
curl -L -o run_full220_local.sh https://huggingface.co/ZenoNing/ConsDrive/resolve/main/scripts/run_full220_local.sh
2.8 kB
| # Full Bench2Drive-220 eval of the ConsDrive v2 checkpoint on this 8-GPU box (no conda). | |
| # CARLA's -graphicsadapter=N is GPU N here, but the leaderboard maps --gpu-rank=k to adapter k+1, | |
| # so GPU 1 cannot host CARLA: its workers run the model on GPU 1 and CARLA on GPU 0. | |
| set -euo pipefail | |
| REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | |
| cd "$REPO_ROOT" | |
| PY=/venv/consdrive/bin/python | |
| RUN_DIR=outputs/qwen3vl_2b_video_dream_consdrive_seed_42/2026-08-09_13-10-02 | |
| RESULT_ROOT="${RESULT_ROOT:-eval_results/Bench2Drive/consdrive_v2_full}" | |
| ROUTES=leaderboard/data/bench2drive220.xml | |
| export CARLA_ROOT=/workspace/carla0915 | |
| # model_gpu:carla_gpu_rank, two workers per entry. | |
| SLOTS=(0:0 1:0 2:1 3:2 4:3 5:4 6:5 7:6) | |
| WORKERS=$(( ${#SLOTS[@]} * 2 )) | |
| mkdir -p "$RESULT_ROOT/logs" "$RESULT_ROOT/scripts" | |
| mapfile -t SUBSETS < <($PY - "$ROUTES" "$WORKERS" <<'PY' | |
| import sys | |
| import xml.etree.ElementTree as ET | |
| ids = [r.attrib["id"] for r in ET.parse(sys.argv[1]).iter("route")] | |
| w = int(sys.argv[2]) | |
| for k in range(w): | |
| print(",".join(ids[k::w])) | |
| PY | |
| ) | |
| for ((w = 0; w < WORKERS; w++)); do | |
| slot=${SLOTS[$((w / 2))]} | |
| gpu=${slot%%:*} | |
| rank=${slot##*:} | |
| label=$(printf 'w%02d_g%d_cr%d' "$w" "$gpu" "$rank") | |
| launcher="$RESULT_ROOT/scripts/run_${label}.sh" | |
| cat > "$launcher" <<EOF | |
| #!/usr/bin/env bash | |
| cd '$REPO_ROOT' | |
| export CUDA_VISIBLE_DEVICES=$gpu OMP_NUM_THREADS=8 CARLA_ROOT=$CARLA_ROOT | |
| exec $PY eval_bench2drive.py \\ | |
| --checkpoint $RUN_DIR/checkpoints/last.ckpt --config $RUN_DIR/eval_config.yaml \\ | |
| --routes $ROUTES --routes-subset '${SUBSETS[$w]}' \\ | |
| --result-dir $RESULT_ROOT --result-file $RESULT_ROOT/bench2drive220_${label}.json \\ | |
| --agent-config-file $RESULT_ROOT/agent_config_${label}.json \\ | |
| --retry-state-file $RESULT_ROOT/retry_state_${label}.json \\ | |
| --debug-checkpoint-file $RESULT_ROOT/live_results_${label}.txt \\ | |
| --port $((20000 + w * 50)) --traffic-manager-port $((30000 + w * 50)) --traffic-manager-seed 1 \\ | |
| --timeout 600 --max-route-retries 3 --retry-wait 15 --carla-death-grace 90 \\ | |
| --gpu-rank $rank --agent-file team_code/agent_drivevla.py --carla-root $CARLA_ROOT \\ | |
| --consequence-gating --gating-algorithm v3 --gating-risk-threshold 0.10 \\ | |
| --gating-speed-scales 1.0,0.9,0.8 --gating-aggregate max \\ | |
| --gating-hysteresis-down-steps 3 --gating-hysteresis-up-steps 5 --gating-min-speed 1.5 \\ | |
| --visualize-trajectories --trajectory-viz-frequency 5 --trajectory-viz-dir $RESULT_ROOT/trajectory_viz/${label} \\ | |
| --record-dir $RESULT_ROOT/recorder --overwrite | |
| EOF | |
| chmod +x "$launcher" | |
| tmux new-session -d -s "b2d220_${label}" \ | |
| "bash '$launcher' > '$RESULT_ROOT/logs/${label}.log' 2>&1; echo WORKER_EXIT=\$? >> '$RESULT_ROOT/logs/${label}.log'" | |
| sleep 3 | |
| done | |
| echo "launched $WORKERS workers; logs in $RESULT_ROOT/logs" | |