Skip to content

Commit 7717d08

Browse files
authored
Fix an endless loop issue when engine_step throws a RuntimeError (#339)
1 parent 42e0c1d commit 7717d08

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vllm/engine/async_llm_engine.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,11 @@ async def generate(
144144

145145
# Kick the engine if the engine is not running.
146146
if not self.is_engine_running:
147-
await self.engine_step(request_id)
147+
try:
148+
await self.engine_step(request_id)
149+
except RuntimeError as e:
150+
await self.abort(request_id)
151+
raise e
148152

149153
# Wait for new output. The group_event will be set in engine_step
150154
# when there is new output available for the sequence group.

0 commit comments

Comments
 (0)