Skip to content

Commit d7e1e59

Browse files
[Doc]: fix typos in Python comments (vllm-project#24093)
Signed-off-by: Didier Durand <[email protected]>
1 parent c4ed78b commit d7e1e59

File tree

15 files changed

+23
-23
lines changed

15 files changed

+23
-23
lines changed

tests/core/test_scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def test_schedule_decode_blocks_to_copy_update():
641641
# Nothing is preempted.
642642
assert output.blocks_to_swap_out == []
643643
# Since append_slot returns the source -> dist mapping, it should
644-
# applied.
644+
# be applied.
645645
assert output.blocks_to_copy == [(2, 3)]
646646

647647

tests/entrypoints/openai/correctness/test_transcription_api_correctness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def to_bytes(y, sr):
3232

3333
async def transcribe_audio(client, tokenizer, y, sr):
3434
# Send loaded audio directly instead of loading from disk,
35-
# dont account for that time though
35+
# don't account for that time though
3636
with to_bytes(y, sr) as f:
3737
start_time = time.perf_counter()
3838
transcription = await client.audio.transcriptions.create(

tests/entrypoints/openai/test_return_token_ids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ async def test_comparison_with_prompt_logprobs_and_logprobs(server):
224224
logprobs_token_ids.append(token_id)
225225

226226
# When echo=True, the logprobs include both prompt and response tokens
227-
# The token_ids field should match the the suffix of response portion
227+
# The token_ids field should match the suffix of response portion
228228
# The prompt_token_ids should match the prompt portion
229229
assert len(completion.choices[0].token_ids) < len(logprobs_token_ids)
230230
response_token_ids_length = len(completion.choices[0].token_ids)

tests/entrypoints/openai/test_serving_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ async def test_serving_chat_did_set_correct_cache_salt(model_type):
313313
}],
314314
)
315315

316-
# By default cache_salt in the engine prompt is not set
316+
# By default, cache_salt in the engine prompt is not set
317317
with suppress(Exception):
318318
await serving_chat.create_chat_completion(req)
319319
assert "cache_salt" not in mock_engine.generate.call_args.args[0]

tests/kernels/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ def baseline_scaled_mm(a: torch.Tensor,
12361236
bias: Optional[torch.Tensor] = None) -> torch.Tensor:
12371237

12381238
# We treat N-dimensional group scaling as extended numpy-style broadcasting
1239-
# in numpy simply stretches dimensions with an extent of 1 to match the
1239+
# in numpy simply stretches dimensions with an extent of 1 to match
12401240
# the target shape by repeating the data along that dimension (broadcasting)
12411241
# , we extend these semantics to say if the extent of a dimension in the
12421242
# source shape is not 1 and does not match the target shape we repeat each

tests/multimodal/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ def run_dp_sharded_vision_model_vs_direct(local_rank: int, world_size: int,
458458
with torch.inference_mode():
459459
sharded_output = run_dp_sharded_vision_model(image_input, vision_model)
460460

461-
# Check that the world size is setup correctly
461+
# Check that the world size is set up correctly
462462
assert get_tensor_model_parallel_world_size() == world_size
463463

464464
# Check that the outputs have the same shape
@@ -642,7 +642,7 @@ def run_dp_sharded_mrope_vision_model_vs_direct(local_rank: int,
642642
rope_type="rope_3d")
643643
sharded_output = torch.cat(sharded_output, dim=0)
644644

645-
# Check that the world size is setup correctly
645+
# Check that the world size is set up correctly
646646
assert get_tensor_model_parallel_world_size() == world_size
647647

648648
# Compare outputs (only on rank 0)

tests/v1/e2e/test_spec_decode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_ngram_correctness(
8383
model_name: str,
8484
):
8585
'''
86-
Compare the outputs of a original LLM and a speculative LLM
86+
Compare the outputs of an original LLM and a speculative LLM
8787
should be the same when using ngram speculative decoding.
8888
'''
8989
with monkeypatch.context() as m:

tests/v1/kv_connector/unit/test_remote_decode_lifecycle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_basic_lifecycle():
4242
engine_core_outputs = scheduler.update_from_output(scheduler_output,
4343
model_runner_output)
4444

45-
# Ensure the request is finished after 1 tokens.
45+
# Ensure the request is finished after 1 token.
4646
assert request.is_finished()
4747
assert request.status == RequestStatus.FINISHED_LENGTH_CAPPED
4848
output = engine_core_outputs[0].outputs[0]
@@ -141,7 +141,7 @@ def test_short_prompt_lifecycle():
141141

142142

143143
def test_prefix_cache_lifecycle():
144-
"""Test that remote decode params still works with a prefix cache hit."""
144+
"""Test that remote decode params still work with a prefix cache hit."""
145145

146146
vllm_config = create_vllm_config()
147147
scheduler = create_scheduler(vllm_config)

tests/v1/spec_decode/test_tree_attention.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def test_tree_attn_correctness() -> None:
187187
dtype=torch.bfloat16,
188188
)
189189

190-
# Setup the block table and KV cache for paged KV.
190+
# Set up the block table and KV cache for paged KV.
191191
assert max_sequence_length % block_size == 0
192192
max_blocks_per_batch = max_sequence_length // block_size
193193
kv_cache = torch.randn(
@@ -222,7 +222,7 @@ def test_tree_attn_correctness() -> None:
222222
num_alloc_blocks_per_batch] = block_ids.view(
223223
-1, num_alloc_blocks_per_batch)
224224

225-
# Setup the slot mapping for the input KVs.
225+
# Set up the slot mapping for the input KVs.
226226
tree_positions = sequence_position + torch.arange(
227227
0,
228228
tree_size_q,

vllm/lora/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def get_adapter_absolute_path(lora_path: str) -> str:
239239
except (HfHubHTTPError, RepositoryNotFoundError, EntryNotFoundError,
240240
HFValidationError):
241241
# Handle errors that may occur during the download
242-
# Return original path instead instead of throwing error here
242+
# Return original path instead of throwing error here
243243
logger.exception("Error downloading the HuggingFace model")
244244
return lora_path
245245

0 commit comments

Comments
 (0)