From cefdb9962d788393f96f8881e0e3c1434ac09c2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=97=E9=B9=8F?= Date: Fri, 13 Jun 2025 14:57:48 +0800 Subject: [PATCH] [Fix] The zip function in Python 3.9 does not have the strict argument (#19549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 汪志鹏 --- vllm/v1/worker/gpu_model_runner.py | 6 ++---- vllm/v1/worker/tpu_model_runner.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/vllm/v1/worker/gpu_model_runner.py b/vllm/v1/worker/gpu_model_runner.py index 2fa9f25c37195..e15daaac95a47 100644 --- a/vllm/v1/worker/gpu_model_runner.py +++ b/vllm/v1/worker/gpu_model_runner.py @@ -467,10 +467,8 @@ class GPUModelRunner(LoRAModelRunnerMixin): # Update the block IDs. if not req_data.resumed_from_preemption: # Append the new blocks to the existing block IDs. - for block_ids, new_block_ids in zip( # type: ignore[call-overload] - req_state.block_ids, - req_data.new_block_ids, - strict=True): + for block_ids, new_block_ids in zip(req_state.block_ids, + req_data.new_block_ids): block_ids.extend(new_block_ids) else: # The request is resumed from preemption. diff --git a/vllm/v1/worker/tpu_model_runner.py b/vllm/v1/worker/tpu_model_runner.py index d5f40e4d3103c..89c6373b37730 100644 --- a/vllm/v1/worker/tpu_model_runner.py +++ b/vllm/v1/worker/tpu_model_runner.py @@ -413,10 +413,8 @@ class TPUModelRunner(LoRAModelRunnerMixin): req_state.num_computed_tokens = req_data.num_computed_tokens if not req_data.resumed_from_preemption: # Append the new blocks to the existing block IDs. - for block_ids, new_block_ids in zip( # type: ignore[call-overload] - req_state.block_ids, - req_data.new_block_ids, - strict=True): + for block_ids, new_block_ids in zip(req_state.block_ids, + req_data.new_block_ids): block_ids.extend(new_block_ids) else: # The request is resumed from preemption.