-
For an Op retry policy, how can we know inside the op context if the current execution is a retry? |
Beta Was this translation helpful? Give feedback.
Answered by
sryza
Feb 28, 2023
Replies: 1 comment 1 reply
-
You can use context.retry_number. @op(retry_policy=RetryPolicy(max_retries=2))
def my_op(context):
is_retry = context.retry_number > 0
... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sryza
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use context.retry_number.