"src/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "0af12f1f8a1682833c944354daeba0c9d9c0f342"
Unverified Commit b6fbb9a5 authored by Woosuk Kwon's avatar Woosuk Kwon Committed by GitHub
Browse files

Sort the outputs before return (#402)

parent 2179e4f4
...@@ -155,4 +155,8 @@ class LLM: ...@@ -155,4 +155,8 @@ class LLM:
pbar.update(1) pbar.update(1)
if use_tqdm: if use_tqdm:
pbar.close() pbar.close()
# Sort the outputs by request ID.
# This is necessary because some requests may be finished earlier than
# its previous requests.
outputs = sorted(outputs, key=lambda x: int(x.request_id))
return outputs return outputs
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