"tests/vscode:/vscode.git/clone" did not exist on "9a1d20a89c3b1f2c2687dee585b22c93f05b2310"
Unverified Commit cefdb996 authored by 汪志鹏's avatar 汪志鹏 Committed by GitHub
Browse files

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


Signed-off-by: default avatar汪志鹏 <wangzhipeng628@gmail.com>
parent ace5cdaf
...@@ -467,10 +467,8 @@ class GPUModelRunner(LoRAModelRunnerMixin): ...@@ -467,10 +467,8 @@ class GPUModelRunner(LoRAModelRunnerMixin):
# Update the block IDs. # Update the block IDs.
if not req_data.resumed_from_preemption: if not req_data.resumed_from_preemption:
# Append the new blocks to the existing block IDs. # Append the new blocks to the existing block IDs.
for block_ids, new_block_ids in zip( # type: ignore[call-overload] for block_ids, new_block_ids in zip(req_state.block_ids,
req_state.block_ids, req_data.new_block_ids):
req_data.new_block_ids,
strict=True):
block_ids.extend(new_block_ids) block_ids.extend(new_block_ids)
else: else:
# The request is resumed from preemption. # The request is resumed from preemption.
......
...@@ -413,10 +413,8 @@ class TPUModelRunner(LoRAModelRunnerMixin): ...@@ -413,10 +413,8 @@ class TPUModelRunner(LoRAModelRunnerMixin):
req_state.num_computed_tokens = req_data.num_computed_tokens req_state.num_computed_tokens = req_data.num_computed_tokens
if not req_data.resumed_from_preemption: if not req_data.resumed_from_preemption:
# Append the new blocks to the existing block IDs. # Append the new blocks to the existing block IDs.
for block_ids, new_block_ids in zip( # type: ignore[call-overload] for block_ids, new_block_ids in zip(req_state.block_ids,
req_state.block_ids, req_data.new_block_ids):
req_data.new_block_ids,
strict=True):
block_ids.extend(new_block_ids) block_ids.extend(new_block_ids)
else: else:
# The request is resumed from preemption. # The request is resumed from preemption.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment