-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add retry config for failing steps #2627
Conversation
Important Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughZenML has introduced a new retry mechanism across various components, enhancing robustness by allowing steps and pipelines to handle failures gracefully. This update includes the addition of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@coderabbitai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Show resolved
Hide resolved
…ng-steps.md Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
…ng-steps.md Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great one! You asked for my input on the syntax. I like it, but as a suggestion, maybe we can enable direct integer based as an easier alternative?
@step(retry=StepRetryConfig(max_retries=3))
# same as :
@step(retry=3)
But that's purely syntactic sugar
…ml into feature/OSSK-512-step-retry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can you mention something about infinite retries?
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
docs/book/user-guide/advanced-guide/pipelining-features/managing-steps.md
Outdated
Show resolved
Hide resolved
…ng-steps.md Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
…ng-steps.md Co-authored-by: Alex Strick van Linschoten <strickvl@users.noreply.github.com>
|
||
while retries < max_retries: | ||
try: | ||
self._run_step( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the current logic, this will run the failure hook every time a try runs. Is that indented? Just logically I would expect that failure hook to only run in case all retries failed, otherwise I get notified about steps that didn't even cause my pipeline to fail?
Co-authored-by: Michael Schuster <schustmi@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested this, but code LGTM!
Describe changes
This PR adds a
retry
logic to ZenML steps. The retry mechanism allows them to configure automatic retries for their steps in case of failures, which only applies to the orchestrator level where the code is being executed.Users can configure the retry behavior for a step using the retry parameter in the @step decorator or a configuration file. The following parameters can be set:
Code Snippet:
or config.yaml:
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes
Summary by CodeRabbit