From 7fc2079279c66e82a2d0008b3b7d8018cfbae5c8 Mon Sep 17 00:00:00 2001 From: Aleksandr Movchan Date: Thu, 31 Oct 2024 10:45:53 +0000 Subject: [PATCH] Update retryable_exceptions to include ActorDiedError and OutOfMemoryError --- aana/sdk.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aana/sdk.py b/aana/sdk.py index a49317e6..ea9554f1 100644 --- a/aana/sdk.py +++ b/aana/sdk.py @@ -45,7 +45,7 @@ def __init__( name (str, optional): The name of the application. Defaults to "app". migration_func (Callable | None): The migration function to run. Defaults to None. retryable_exceptions (list[Exception, str] | None): The exceptions that can be retried in the task queue. - Defaults to ['InferenceException']. + Defaults to ['InferenceException', 'ActorDiedError', 'OutOfMemoryError']. """ self.name = name self.migration_func = migration_func @@ -53,7 +53,11 @@ def __init__( self.deployments: dict[str, Deployment] = {} if retryable_exceptions is None: - self.retryable_exceptions = [InferenceException] + self.retryable_exceptions = [ + "InferenceException", + "ActorDiedError", + "OutOfMemoryError", + ] else: self.retryable_exceptions = retryable_exceptions # Convert exceptions to string if they are not already