Skip to content

Commit

Permalink
Update retryable_exceptions to include ActorDiedError and OutOfMemory…
Browse files Browse the repository at this point in the history
…Error
  • Loading branch information
Aleksandr Movchan committed Oct 31, 2024
1 parent 6781b50 commit 7fc2079
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aana/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,19 @@ 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
self.endpoints: dict[str, Endpoint] = {}
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
Expand Down

0 comments on commit 7fc2079

Please sign in to comment.