Fix review bugs: PD-sep counter leaks, hardcoded paths, missing deps
Critical: - cache_aware_proxy: _handle_pd_sep leaked p_inst.num_requests (never decremented) and never managed d_inst.num_requests; fix media_type from application/json to text/event-stream for SSE stream High: - b3_sweep/b3_isolated_policy/b3_analyze: replace hardcoded /home/admin/cpfs/wjh/ ROOT with script-relative $(dirname "$0")/.. - b3_analyze: replace hardcoded 8-port WORKER_MAP with dynamic generation from BASE_PORT and N_INSTANCES Medium: - analyze_breakdown: warn on stderr when records are skipped (was silent) - deploy_vllm_patches: fail-fast on SSH/SCP errors instead of continuing with empty VENV_SITE - pyproject.toml: declare fastapi and uvicorn as runtime dependencies - launch_elastic_p2p: kill EngineCore and proxy in trap handler to prevent GPU memory leaks on exit
This commit is contained in:
@@ -9,11 +9,19 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="${ROOT:-/home/admin/cpfs/wjh/agentic-kv}"
|
||||
ROOT="${ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
|
||||
VENV="$ROOT/.venv/bin"
|
||||
SWEEP_DIR="${1:?usage: $0 <sweep_dir>}"
|
||||
|
||||
WORKER_MAP="http://127.0.0.1:8000=engine_0,http://127.0.0.1:8001=engine_1,http://127.0.0.1:8002=engine_2,http://127.0.0.1:8003=engine_3,http://127.0.0.1:8004=engine_4,http://127.0.0.1:8005=engine_5,http://127.0.0.1:8006=engine_6,http://127.0.0.1:8007=engine_7"
|
||||
BASE_PORT="${BASE_PORT:-8000}"
|
||||
N_INSTANCES="${N_INSTANCES:-8}"
|
||||
|
||||
# Build WORKER_MAP dynamically from BASE_PORT and N_INSTANCES.
|
||||
_worker_map_parts=()
|
||||
for ((i=0; i<N_INSTANCES; i++)); do
|
||||
_worker_map_parts+=("http://127.0.0.1:$((BASE_PORT + i))=engine_$i")
|
||||
done
|
||||
WORKER_MAP=$(IFS=,; echo "${_worker_map_parts[*]}")
|
||||
|
||||
_has_engine_data() {
|
||||
# Return 0 (true) if $1/*.jsonl contains any non-empty file.
|
||||
|
||||
Reference in New Issue
Block a user