From 471c8f117d6a274f0ed42704f232ffd96801282c Mon Sep 17 00:00:00 2001 From: Daniel Sola Date: Wed, 27 Mar 2024 15:37:40 -0700 Subject: [PATCH] Change retry error from RuntimeError to FlyteRecoverableException --- docs/flyte_fundamentals/optimizing_tasks.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/flyte_fundamentals/optimizing_tasks.md b/docs/flyte_fundamentals/optimizing_tasks.md index 9f3124e2700..00b3c693f19 100644 --- a/docs/flyte_fundamentals/optimizing_tasks.md +++ b/docs/flyte_fundamentals/optimizing_tasks.md @@ -66,12 +66,13 @@ import random @task(retries=3) def compute_mean(data: List[float]) -> float: if random() < 0.05: - raise RuntimeError("Something bad happened 🔥") + raise FlyteRecoverableException("Something bad happened 🔥") return sum(data) / len(data) ``` ```{note} -Retries only take effect when running a task on a Flyte cluster. +Retries only take effect when running a task on a Flyte cluster. +See {ref}`Fault Tolerance ` for details on the types of errors that will be retried. ``` ## Timeouts