Add pydocstyle to the ruff rules (#52136)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Harry Mellor <hej.mellor@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
@@ -1,8 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
"""
Example script demonstrating long text embedding with chunked processing in vLLM.
"""Example script demonstrating long text embedding with chunked processing in vLLM.
This example shows how to use vLLM's chunked processing feature to handle text
inputs that exceed the model's maximum token length. The feature automatically
@@ -1,8 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
# ruff: noqa: E501
"""
This example shows how to use vLLM for running offline inference with
"""This example shows how to use vLLM for running offline inference with
the correct prompt format on vision language models for multimodal embedding.
For most models, the prompt format should follow corresponding examples
@@ -37,8 +37,7 @@ def create_chat_embeddings(
add_special_tokens: bool = False,
padding: str | NotGiven = NOT_GIVEN,
) -> CreateEmbeddingResponse:
"""
Convenience function for accessing vLLM's Chat Embeddings API,
"""Convenience function for accessing vLLM's Chat Embeddings API,
which is an extension of OpenAI's existing Embeddings API.
"""
return client.post(
@@ -56,13 +55,11 @@ def create_chat_embeddings(
def run_clip(client: OpenAI, model: str):
"""
Start the server using:
"""Start the server using:
vllm serve openai/clip-vit-base-patch32 \
--runner pooling
"""
response = create_chat_embeddings(
client,
messages=[
@@ -97,8 +94,7 @@ def run_clip(client: OpenAI, model: str):
def run_dse_qwen2_vl(client: OpenAI, model: str):
"""
Start the server using:
"""Start the server using:
vllm serve MrLight/dse-qwen2-2b-mrl-v1 \
--runner pooling \
@@ -159,14 +155,12 @@ def run_dse_qwen2_vl(client: OpenAI, model: str):
def run_qwen3_vl(client: OpenAI, model: str):
"""
Start the server using:
"""Start the server using:
vllm serve Qwen/Qwen3-VL-Embedding-2B \
--runner pooling \
--max-model-len 8192
"""
default_instruction = "Represent the user's input."
print("Text embedding output:")
@@ -266,14 +260,12 @@ def run_qwen3_vl(client: OpenAI, model: str):
def run_siglip(client: OpenAI, model: str):
"""
Start the server using:
"""Start the server using:
vllm serve google/siglip-base-patch16-224 \
--runner pooling \
--chat-template template_basic.jinja
"""
response = create_chat_embeddings(
client,
messages=[
@@ -311,8 +303,7 @@ def run_siglip(client: OpenAI, model: str):
def run_vlm2vec(client: OpenAI, model: str):
"""
Start the server using:
"""Start the server using:
vllm serve TIGER-Lab/VLM2Vec-Full \
--runner pooling \
@@ -320,7 +311,6 @@ def run_vlm2vec(client: OpenAI, model: str):
--max-model-len 4096 \
--chat-template examples/pooling/embed/template/vlm2vec_phi3v.jinja
"""
response = create_chat_embeddings(
client,
messages=[