From 352ade021b4bbffd6fcc6a2ea0a138294e19e5c6 Mon Sep 17 00:00:00 2001 From: SZCJW <792430652@qq.com> Date: Fri, 27 Mar 2026 01:26:30 +0800 Subject: [PATCH] x --- scripts/start_vllm.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/start_vllm.py b/scripts/start_vllm.py index 96952c4..135b674 100644 --- a/scripts/start_vllm.py +++ b/scripts/start_vllm.py @@ -149,28 +149,46 @@ def configure_and_launch(model_idx, gpu_count): # 2) LOCAL_MODEL_DIR/ # 3) case-insensitive match of in LOCAL_MODEL_DIR model_path = model_id + print(f"DEBUG: Starting model path lookup...") if LOCAL_MODEL_DIR: + print(f"DEBUG: LOCAL_MODEL_DIR is set to: {LOCAL_MODEL_DIR}") + print(f"DEBUG: LOCAL_MODEL_DIR exists: {os.path.exists(LOCAL_MODEL_DIR)}") + if os.path.exists(LOCAL_MODEL_DIR): + print(f"DEBUG: LOCAL_MODEL_DIR contents: {os.listdir(LOCAL_MODEL_DIR)}") + # Full repo path (owner/repo) candidate_full = os.path.join(LOCAL_MODEL_DIR, model_id) + print(f"DEBUG: Checking candidate_full: {candidate_full}") + print(f"DEBUG: candidate_full exists: {os.path.isdir(candidate_full)}") if os.path.isdir(candidate_full): model_path = candidate_full + print(f"DEBUG: Found model at: {model_path}") else: # Repo-name only (last segment) repo_name = model_id.split('/')[-1] candidate_repo = os.path.join(LOCAL_MODEL_DIR, repo_name) + print(f"DEBUG: Checking candidate_repo: {candidate_repo}") + print(f"DEBUG: candidate_repo exists: {os.path.isdir(candidate_repo)}") if os.path.isdir(candidate_repo): model_path = candidate_repo + print(f"DEBUG: Found model at: {model_path}") else: # Fallback: try to find a directory in LOCAL_MODEL_DIR that matches repo_name case-insensitively + print(f"DEBUG: Trying case-insensitive match for: {repo_name}") try: for entry in os.listdir(LOCAL_MODEL_DIR): + print(f"DEBUG: Checking entry: {entry}") if entry.lower() == repo_name.lower(): entry_path = os.path.join(LOCAL_MODEL_DIR, entry) if os.path.isdir(entry_path): model_path = entry_path + print(f"DEBUG: Found model at: {model_path}") break - except Exception: - pass + except Exception as e: + print(f"DEBUG: Exception during case-insensitive lookup: {e}") + + print(f"DEBUG: Final model_path: {model_path}") + print(f"DEBUG: model_path == model_id: {model_path == model_id}") # if LOCAL_MODEL_DIR is specified, refuse to fall back to remote if LOCAL_MODEL_DIR and model_path == model_id: