@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / fad73be1a5
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[Doc]: fix typos in Python comments (#24077)

Signed-off-by: Didier Durand <durand.didier@gmail.com>

Didier Durand committed Sep 2, 2025 at 11:38 UTC fad73be1a54391efc5b974c86a077b421b58dace
14 files changed +19 -19
tests/async_engine/test_api_server.py
+1 -1
@@ -98,7 +98,7 @@ def test_api_server(api_server, distributed_executor_backend: str):
98 pool.join()
99
100 # check cancellation stats
101 - # give it some times to update the stats
101 + # give it some time to update the stats
102 time.sleep(1)
103
104 num_aborted_requests = requests.get(
tests/core/block/e2e/test_correctness.py
+2 -2
@@ -439,10 +439,10 @@ def test_auto_prefix_caching_with_preemption(baseline_llm_generator,
439 @pytest.mark.parametrize("seed", [1])
440 def test_auto_prefix_caching_after_eviction_start(baseline_llm_generator,
441 test_llm_generator):
442 - """Verify block manager v2 with auto prefix caching could works normal
442 + """Verify block manager v2 with auto prefix caching could work normally
443 even when eviction started.
444 With APC enabled, all blocks are held by native block at the beginning.
445 - Then blocks are managed by evictor instead. If cache hit at the evitor's
445 + Then blocks are managed by evictor instead. If cache hit at the evictor's
446 block, then it could be reused, or we need to recompute its kv cache.
447 """
448 output_len = 10
tests/engine/test_arg_utils.py
+1 -1
@@ -167,7 +167,7 @@ def test_get_kwargs():
167 # dict should have json tip in help
168 json_tip = "Should either be a valid JSON string or JSON keys"
169 assert json_tip in kwargs["json_tip"]["help"]
170 - # nested config should should construct the nested config
170 + # nested config should construct the nested config
171 assert kwargs["nested_config"]["type"]('{"field": 2}') == NestedConfig(2)
172
173
tests/kernels/moe/test_deepep_deepgemm_moe.py
+1 -1
@@ -282,7 +282,7 @@ def triton_impl(a: torch.Tensor, topk_ids: torch.Tensor,
282 a1_scale=a1_scale,
283 block_shape=block_shape,
284 # Make sure this is set to False so we
285 - # dont end up comparing the same implementation.
285 + # don't end up comparing the same implementation.
286 allow_deep_gemm=False)
287
288
tests/lora/test_add_lora.py
+2 -2
@@ -59,10 +59,10 @@ async def requests_processing_time(llm,
59 @pytest.mark.asyncio
60 async def test_add_lora(chatglm3_lora_files):
61 """
62 - The add_lora function is used to pre-load some LoRA adapters into the
62 + The add_lora function is used to preload some LoRA adapters into the
63 engine in anticipation of future requests using these adapters. To test
64 this functionality, we use the async engine to process some requests - We
65 - do it twice, once with add_lora() pre-loading and once without.
65 + do it twice, once with add_lora() preloading and once without.
66
67 We measure the request processing time in both cases and expect the time
68 to be lesser in the case with add_lora() calls.
tests/lora/test_lora_allowed_token_ids.py
+2 -2
@@ -18,7 +18,7 @@ def test_allowed_token_ids_with_lora_vocab(llama_2_7b_base_huggingface_id,
18 adapters that define additional tokens.
19 """
20
21 - # Setup a base model compatible with the sql_lora_files adapter and
21 + # Set up a base model compatible with the sql_lora_files adapter and
22 # a known number of tokens in the base model.
23 model_config = ModelConfig(
24 model=llama_2_7b_base_huggingface_id,
@@ -84,7 +84,7 @@ def test_allowed_token_ids_with_lora_adapter_no_vocab(
84 adapters that do not define additional tokens.
85 """
86
87 - # Setup a base model compatible with the qwen25vl_lora_files adapter and
87 + # Set up a base model compatible with the qwen25vl_lora_files adapter and
88 # a known number of tokens in the base model.
89 model_config = ModelConfig(
90 model=qwen25vl_base_huggingface_id,
tests/models/language/generation/test_common.py
+1 -1
@@ -13,7 +13,7 @@ from ...registry import HF_EXAMPLE_MODELS
13 from ...utils import check_logprobs_close
14
15 # These have unsupported head_dim for FA. We do not
16 -# not have a clean way to fall back, so we fail with
16 +# have a clean way to fall back, so we fail with
17 # a clear msg when it happens.
18 # https://github.com/vllm-project/vllm/issues/14524
19 REQUIRES_V0 = ["microsoft/phi-2", "stabilityai/stablelm-3b-4e1t"]
tests/models/language/generation/test_mistral.py
+2 -2
@@ -20,7 +20,7 @@ MISTRAL_FORMAT_MODELS = [
20 "mistralai/Mistral-7B-Instruct-v0.3",
21 # uses the v3-Tekken tokenizer
22 "mistralai/Ministral-8B-Instruct-2410",
23 - # Mistral-Nemo is to big for CI, but passes locally
23 + # Mistral-Nemo is too big for CI, but passes locally
24 # "mistralai/Mistral-Nemo-Instruct-2407"
25 ]
26
@@ -273,7 +273,7 @@ def test_mistral_function_calling(vllm_runner, model: str, dtype: str) -> None:
273
274
275 def test_mistral_function_call_nested_json():
276 - """Ensure that the function-name regex captures the entire outer-most
276 + """Ensure that the function-name regex captures the entire outermost
277 JSON block, including nested braces."""
278
279 # Create a minimal stub tokenizer that provides the few attributes the
tests/models/multimodal/generation/test_qwen2_vl.py
+2 -2
@@ -154,7 +154,7 @@ def batch_make_image_embeddings(
154 embed_counter += cur_batch_embed_len
155 image_counter += cur_batch_image_count
156
157 - # ensure we don't lost any images or embeddings
157 + # ensure we don't lose any images or embeddings
158 assert embed_counter == image_embeds.size(0)
159 assert image_counter == image_grid_thw.size(0)
160 assert len(image_batches) == len(result)
@@ -238,7 +238,7 @@ def batch_make_video_embeddings(
238 embed_counter += cur_batch_embed_len
239 video_counter += cur_batch_video_count
240
241 - # ensure we don't lost any videos or embeddings
241 + # ensure we don't lose any videos or embeddings
242 assert embed_counter == video_embeds.size(0)
243 assert video_counter == video_grid_thw.size(0)
244 assert len(video_batches) == len(result)
tests/v1/core/test_kv_cache_utils.py
+1 -1
@@ -247,7 +247,7 @@ def test_free_kv_cache_block_queue_append_n():
247
248 def test_free_kv_cache_block_queue_popleft_n():
249 blocks = [KVCacheBlock(block_id=i) for i in range(6)]
250 - # Create a empty FreeKVCacheBlockQueue with these blocks
250 + # Create an empty FreeKVCacheBlockQueue with these blocks
251 queue = FreeKVCacheBlockQueue(
252 [blocks[1], blocks[3], blocks[5], blocks[4], blocks[0], blocks[2]])
253 assert queue.num_free_blocks == 6
tests/v1/executor/test_executor.py
+1 -1
@@ -27,7 +27,7 @@ class CustomMultiprocExecutor(MultiprocExecutor):
27 kwargs: Optional[dict] = None,
28 non_block: bool = False,
29 unique_reply_rank: Optional[int] = None) -> list[Any]:
30 - # Drop marker to show that this was ran
30 + # Drop marker to show that this was run
31 with open(".marker", "w"):
32 ...
33 return super().collective_rpc(method, timeout, args, kwargs)
tests/v1/spec_decode/test_eagle.py
+1 -1
@@ -183,7 +183,7 @@ def test_load_model(mock_get_model, mock_get_layers, mock_get_pp_group, method,
183 mock_pp_group.world_size = pp_size
184 mock_get_pp_group.return_value = mock_pp_group
185
186 - # Setup the target model mock with a custom class so that
186 + # Set up the target model mock with a custom class so that
187 # isinstance() checks match the expected type.
188 class _TargetModelStub(LlamaForCausalLM):
189 model: mock.MagicMock
tests/v1/test_kv_sharing.py
+1 -1
@@ -30,7 +30,7 @@ def test_initialize_kv_cache_for_kv_sharing_different_attn_groups():
30 }
31
32 # Layers 0 and 1 both belong in KV cache group 0
33 - # However, if they have have different attention backends, they will be
33 + # However, if they have different attention backends, they will be
34 # placed in different attention groups for KV cache group 0
35 kv_cache_groups = [
36 KVCacheGroupSpec(["model.layers.0", "model.layers.1"],
tests/v1/worker/test_gpu_model_runner.py
+1 -1
@@ -702,7 +702,7 @@ def test_hybrid_attention_mamba_tensor_shapes(monkeypatch):
702 KVCacheTensors for the attention and mamba layers
703 (via _reshape_kv_cache_tensors function). This test verifies
704 that the views are compatible: writing a mamba block
705 - will not corrupt an attention block and vice-versa
705 + will not corrupt an attention block and vice versa
706 '''
707
708 current_platform.seed_everything(42)