actually invoke vllm this time
This commit is contained in:
@@ -267,9 +267,12 @@ def strip_shim_from_pythonpath():
|
||||
def main():
|
||||
args = sys.argv[1:]
|
||||
|
||||
# Determine which vllm module was actually invoked so we exec the real one
|
||||
# (could be vllm.entrypoints.cli.main, vllm.entrypoints.openai.api_server, etc.)
|
||||
invoked_module = __name__ # e.g. "vllm.entrypoints.cli.main" or "vllm.entrypoints.openai.api_server"
|
||||
log("=" * 50)
|
||||
log("vLLM Custom Weights Shim")
|
||||
log(f" Invoked as: python -m {__name__} {' '.join(args)}")
|
||||
log(f" Invoked as: python -m {invoked_module} {' '.join(args)}")
|
||||
log("=" * 50)
|
||||
|
||||
# Intercept --model / positional model if it's a URL
|
||||
@@ -278,8 +281,8 @@ def main():
|
||||
# Strip our shim from PYTHONPATH so the real vLLM resolves correctly
|
||||
strip_shim_from_pythonpath()
|
||||
|
||||
# Build the real vLLM command
|
||||
vllm_cmd = [sys.executable, "-m", "vllm.entrypoints.openai.api_server"] + modified_args
|
||||
# Build the real vLLM command using the same module that was invoked
|
||||
vllm_cmd = [sys.executable, "-m", invoked_module] + modified_args
|
||||
|
||||
log(f"Launching vLLM: {' '.join(vllm_cmd)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user