Skip to content

Commit

Permalink
add dead_error property to engine client
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpinDale committed Dec 27, 2024
1 parent 3dc8016 commit 80a9973
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions aphrodite/engine/multiprocessing/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ def is_stopped(self) -> bool:
def errored(self) -> bool:
return self._errored_with is not None

@property
def dead_error(self) -> BaseException:
if self._errored_with is not None:
return ENGINE_DEAD_ERROR(self._errored_with)
else:
return ENGINE_DEAD_ERROR()

async def generate(
self,
inputs: PromptInputs,
Expand Down

0 comments on commit 80a9973

Please sign in to comment.