From 02d2d2a26dd807f5bba98ee5f19ab662ae7fff52 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Wed, 6 Nov 2024 18:24:10 -0800 Subject: [PATCH] Use sys.executable to find python command. --- sdks/python/apache_beam/ml/inference/vllm_inference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdks/python/apache_beam/ml/inference/vllm_inference.py b/sdks/python/apache_beam/ml/inference/vllm_inference.py index b86d33ec16b1..075f3b6971e6 100644 --- a/sdks/python/apache_beam/ml/inference/vllm_inference.py +++ b/sdks/python/apache_beam/ml/inference/vllm_inference.py @@ -24,6 +24,7 @@ import threading import time import uuid +import sys from dataclasses import dataclass from typing import Any from typing import Dict @@ -118,7 +119,7 @@ def __init__(self, model_name: str, vllm_server_kwargs: Dict[str, str]): def start_server(self, retries=3): if not self._server_started: server_cmd = [ - 'python', + sys.executable, '-m', 'vllm.entrypoints.openai.api_server', '--model',