Greg Friedland04/17/2023, 10:36 PM
. According to the docs, I thought this would be considered non-recoverable and thus not retried? I’l put the stack trace in the thread.
Traceback (most recent call last): File "/app/pip_pypi__flytekit/flytekit/exceptions/scopes.py", line 203, in user_entry_point return wrapped(*args, **kwargs) File "/app/atomwise/...", line 266, in run_block block.validate_output(cmpds, result) File "/app/atomwise/..., line 119, in validate_output raise RuntimeError( Message: <blah> User error.
Kevin Su04/17/2023, 11:52 PM
Slackbot04/17/2023, 11:52 PM
Dan Rammer (hamersaw)04/18/2023, 1:50 PM
are retryable. Do we know how the
is handled here? My intuition is that Flyte is more conservative about labeling a failure as non-retryable and wouldn't map all python
errors and therefore non-retryable.
Kevin Su04/18/2023, 9:38 PM
, flytekit will convert it to
(User error) here. it’s retryable right now. cc @Yee
Dan Rammer (hamersaw)04/18/2023, 10:45 PM
identifier only has to do with the number of times a failure is retried (which can be configured to mean one never retries). In this scenario it seems that flytekit will designate the specified error as retryable unless the the user specifically throws a non-recoverable exception. I imagine there have been many discussions about what the preferred behavior is here, regardless from the flytekit side, if you just raise a non-recoverable error it should have the intended behavior. TL;DR @Greg Friedland in the issue it seems that you're manually throwing a runtime exception. Is there any reason you could not just manually designate a Flyte non-recoverable exception instead?
Kevin Su04/18/2023, 11:04 PM
as retryable. To workaround it, you could catch that error, and throw a Flyte non-recoverable exception. Just discussed with Yee, all the non-flyte errors raised from user code should be non-recoverable. we’ll fix it in flytekit side.
Greg Friedland04/19/2023, 12:19 AM
and got the same behavior. Is there another exception type you suggest?
Yee04/19/2023, 1:32 AM
this task runs once for me.
@task(retries=10) def say_hello_error(a: int) -> str: if a == 1: print("Raising Error") raise RuntimeError("my runtime error") return "hi"
Greg Friedland04/19/2023, 4:08 PM