You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jr...@apache.org on 2026/04/02 16:39:04 UTC
(beam) branch master updated: fix vllm lint (#38051)
This is an automated email from the ASF dual-hosted git repository.
jrmccluskey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new bb438338f45 fix vllm lint (#38051)
bb438338f45 is described below
commit bb438338f45c446f6682cdadc9fe80eeeabe2cf8
Author: Danny McCormick <da...@google.com>
AuthorDate: Thu Apr 2 12:38:56 2026 -0400
fix vllm lint (#38051)
---
.../apache_beam/examples/inference/vllm_text_completion.py | 9 +++++----
sdks/python/apache_beam/ml/inference/vllm_inference.py | 7 ++++---
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/sdks/python/apache_beam/examples/inference/vllm_text_completion.py b/sdks/python/apache_beam/examples/inference/vllm_text_completion.py
index 00fe3c319dd..a7468f521eb 100644
--- a/sdks/python/apache_beam/examples/inference/vllm_text_completion.py
+++ b/sdks/python/apache_beam/examples/inference/vllm_text_completion.py
@@ -38,9 +38,10 @@ from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
from apache_beam.runners.runner import PipelineResult
-# Defaults avoid CUDA OOM on ~16GB GPUs (e.g. NVIDIA T4) with vLLM V1: the engine
-# warms the sampler with many dummy sequences unless max_num_seqs is reduced, and
-# the default gpu_memory_utilization can leave no free VRAM for that step.
+# Defaults avoid CUDA OOM on ~16GB GPUs (e.g. NVIDIA T4) with vLLM V1: the
+# engine warms the sampler with many dummy sequences unless max_num_seqs is
+# reduced, and the default gpu_memory_utilization can leave no free VRAM for
+# that step.
_DEFAULT_VLLM_MAX_NUM_SEQS = 32
_DEFAULT_VLLM_GPU_MEMORY_UTILIZATION = 0.72
@@ -141,7 +142,7 @@ def parse_known_args(argv):
def build_vllm_server_kwargs(known_args) -> dict[str, str]:
- """Returns CLI flags for ``VLLMCompletionsModelHandler(..., vllm_server_kwargs=...)``."""
+ """Returns vllm_server_kwargs for ``VLLMCompletionsModelHandler``."""
return {
'max-num-seqs': str(known_args.vllm_max_num_seqs),
'gpu-memory-utilization': str(known_args.vllm_gpu_memory_utilization),
diff --git a/sdks/python/apache_beam/ml/inference/vllm_inference.py b/sdks/python/apache_beam/ml/inference/vllm_inference.py
index 6c0435dc951..38283f1efd4 100644
--- a/sdks/python/apache_beam/ml/inference/vllm_inference.py
+++ b/sdks/python/apache_beam/ml/inference/vllm_inference.py
@@ -201,9 +201,10 @@ class VLLMCompletionsModelHandler(ModelHandler[str,
`python -m vllm.entrypoints.openai.api_serverv <beam provided args>
<vllm_server_kwargs>`. For example, you could pass
`{'echo': 'true'}` to prepend new messages with the previous message.
- On ~16GB GPUs, pass lower ``max-num-seqs`` and ``gpu-memory-utilization``
- values (see ``apache_beam.examples.inference.vllm_text_completion``).
- For a list of possible kwargs, see
+ On ~16GB GPUs, pass lower ``max-num-seqs`` and
+ ``gpu-memory-utilization`` values (see
+ ``apache_beam.examples.inference.vllm_text_completion``). For a list of
+ possible kwargs, see
https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html#extra-parameters-for-completions-api
min_batch_size: optional. the minimum batch size to use when batching
inputs.