Skip to content

Commit

Permalink
hack around slices bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bnellnm committed Feb 6, 2025
1 parent 9639b0d commit e00875a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vllm/v1/engine/async_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,14 @@ async def _run_output_handler(self):
# event loop for too long.
num_outputs = len(outputs.new_token_id_offsets)

if num_outputs <= VLLM_V1_OUTPUT_PROC_CHUNK_SIZE:
if True or num_outputs <= VLLM_V1_OUTPUT_PROC_CHUNK_SIZE:

Check failure on line 254 in vllm/v1/engine/async_llm.py

View workflow job for this annotation

GitHub Actions / pre-commit

Ruff (SIM222)

vllm/v1/engine/async_llm.py:254:20: SIM222 Use `True` instead of `True or ...`
slices = ((0, num_outputs), )
else:
slices = []
parts = np.linspace(
num_outputs,
cdiv(num_outputs, VLLM_V1_OUTPUT_PROC_CHUNK_SIZE))
cdiv(num_outputs, VLLM_V1_OUTPUT_PROC_CHUNK_SIZE),
dtype='int')
last = 0
for i in parts:
slices.append((last, i))
Expand Down

0 comments on commit e00875a

Please sign in to comment.