Skip to content

[Fix] The zip function in Python 3.9 does not have the strict argument #19549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions vllm/v1/worker/gpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,8 @@ def _update_states(self, scheduler_output: "SchedulerOutput") -> None:
# 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.
Expand Down
6 changes: 2 additions & 4 deletions vllm/v1/worker/tpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,8 @@ def _update_states(self, scheduler_output: "SchedulerOutput") -> bool:
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.
Expand Down