Skip to content

Commit ba65df8

Browse files
committed
refactor(agentic): hardcode DSv4 B300 router settings
1 parent fc5a792 commit ba65df8

1 file changed

Lines changed: 19 additions & 26 deletions

File tree

benchmarks/single_node/agentic/dsv4_fp4_b300_vllm.sh

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,29 @@ set -x
1919
#
2020
# Required env vars:
2121
# MODEL, TP, CONC, OFFLOADING, TOTAL_CPU_DRAM_GB, RESULT_DIR
22-
#
23-
# Optional DEP router env vars:
24-
# VLLM_USE_ROUTER=false disables the native vLLM router baseline.
25-
# VLLM_ROUTER_POLICY overrides the default consistent_hash policy.
2622

2723
source "$(dirname "$0")/../../benchmark_lib.sh"
2824

2925
check_env_vars MODEL TP CONC OFFLOADING TOTAL_CPU_DRAM_GB RESULT_DIR DURATION EP_SIZE DP_ATTENTION
3026

31-
if [ -z "${MAX_MODEL_LEN:-}" ] || [ "$MAX_MODEL_LEN" = "0" ]; then
27+
if ! declare -p MAX_MODEL_LEN >/dev/null 2>&1; then
28+
MAX_MODEL_LEN=1000000
29+
elif [[ -z "$MAX_MODEL_LEN" || "$MAX_MODEL_LEN" = "0" ]]; then
3230
MAX_MODEL_LEN=1000000
3331
fi
3432

35-
if [[ -n "${SLURM_JOB_ID:-}" ]]; then
36-
echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}"
33+
if declare -p SLURM_JOB_ID >/dev/null 2>&1 && [ -n "$SLURM_JOB_ID" ]; then
34+
SLURM_NODE=unknown
35+
if declare -p SLURMD_NODENAME >/dev/null 2>&1 && [ -n "$SLURMD_NODENAME" ]; then
36+
SLURM_NODE="$SLURMD_NODENAME"
37+
fi
38+
echo "JOB $SLURM_JOB_ID running on $SLURM_NODE"
3739
fi
3840

3941
# `hf download` creates the target dir if missing and is itself idempotent.
4042
# When MODEL_PATH is unset (stand-alone runs), fall back to the HF_HUB_CACHE
4143
# Either way, MODEL_PATH is what the server is launched with.
42-
if [[ -n "${MODEL_PATH:-}" ]]; then
44+
if declare -p MODEL_PATH >/dev/null 2>&1 && [ -n "$MODEL_PATH" ]; then
4345
if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then
4446
hf download "$MODEL" --local-dir "$MODEL_PATH"
4547
fi
@@ -62,24 +64,15 @@ install_agentic_deps
6264
# testing older wheels that prioritize per-request X-Request-ID.
6365
USE_VLLM_ROUTER=false
6466
VLLM_BACKEND_PORT="$PORT"
65-
case "${VLLM_USE_ROUTER:-true}" in
66-
true)
67-
if [ "$DP_ATTENTION" = "true" ]; then
68-
USE_VLLM_ROUTER=true
69-
VLLM_BACKEND_PORT="${VLLM_BACKEND_PORT_OVERRIDE:-$((PORT + 1))}"
70-
VLLM_ROUTER_VERSION="${VLLM_ROUTER_VERSION:-0.1.14}"
71-
VLLM_ROUTER_POLICY="${VLLM_ROUTER_POLICY:-consistent_hash}"
72-
VLLM_ROUTER_METRICS_PORT="${VLLM_ROUTER_METRICS_PORT:-$((PORT + 10000))}"
73-
export AIPERF_HTTP_X_SESSION_ID_FROM_CORRELATION_ID=1
74-
agentic_pip_install --quiet "vllm-router==$VLLM_ROUTER_VERSION"
75-
fi
76-
;;
77-
false) ;;
78-
*)
79-
echo "Error: unsupported VLLM_USE_ROUTER value '${VLLM_USE_ROUTER}' (expected one of: true, false)" >&2
80-
exit 1
81-
;;
82-
esac
67+
if [ "$DP_ATTENTION" = "true" ]; then
68+
USE_VLLM_ROUTER=true
69+
VLLM_BACKEND_PORT=$((PORT + 1))
70+
VLLM_ROUTER_VERSION=0.1.14
71+
VLLM_ROUTER_POLICY=consistent_hash
72+
VLLM_ROUTER_METRICS_PORT=$((PORT + 10000))
73+
export AIPERF_HTTP_X_SESSION_ID_FROM_CORRELATION_ID=1
74+
agentic_pip_install --quiet "vllm-router==$VLLM_ROUTER_VERSION"
75+
fi
8376

8477
# DeepSeek-V4-Pro weights are large; engine startup can exceed default 600s.
8578
export VLLM_ENGINE_READY_TIMEOUT_S=3600

0 commit comments

Comments
 (0)