Skip to content

Conversation

@mt-ob
Copy link
Collaborator

@mt-ob mt-ob commented Nov 4, 2024

Closes #1443

Consider the flow:

import time
from metaflow import FlowSpec, step, retry

class PlatformRetryFlow(FlowSpec):
    @retry(only_system=True)
    @step
    def start(self):
        time.sleep(10)
        print('fail', 1 / 0)
        self.next(self.end)

    @retry(only_system=True)
    @step
    def end(self):
        print("done!")

if __name__ == '__main__':
    PlatformRetryFlow()

@retry(only_system=True) works locally ✅ , but when used with argo workflows i.e.

python demo.py argo-workflows create
python demo.py argo-workflows trigger

The user exception is also retried --> which we don't want.. ❌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@retry that retries only system errors

1 participant