Skip to content

Commit

Permalink
Use sys.executable to find python command. (#33033)
Browse files Browse the repository at this point in the history
* Use sys.executable to find python command.

* Make linter happy

---------

Co-authored-by: Danny McCormick <[email protected]>
  • Loading branch information
tvalentyn and damccorm authored Nov 7, 2024
1 parent c7e4db7 commit 6742499
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdks/python/apache_beam/ml/inference/vllm_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import logging
import os
import subprocess
import sys
import threading
import time
import uuid
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 6742499

Please sign in to comment.