即使其他步骤失败,我该如何将最后一步添加到运行的sagemaker管道

发布于 2025-01-19 07:08:05 字数 482 浏览 0 评论 0 原文

有没有办法向 sagemaker 管道添加结束步骤,即使其他先前步骤失败,该结束步骤仍然在最后运行(并运行代码)。在我认为我们可以将其设为 失败步骤,但这只能让您返回错误消息,而不能让您运行代码。如果我们将其设为一个条件步骤,我们如何确保它在最后运行而不依赖于任何先前的步骤。我想将前面的所有步骤添加为依赖项,以便它在最后运行,但是如果之前的任何步骤失败,则结束步骤将不会运行。

我尝试使用失败步骤,但无法提供代码。我尝试将其与依赖项放在一起,但如果其他步骤在它之前失败,它就不会运行。我尝试不添加任何依赖项,但最终它不会运行。

Is there a way to add an end step to a sagemaker pipeline that still runs at the very end (and runs code) even if other previous steps fail. Before I thought we could make it a Fail Step but that only lets you return an error message and doesn’t let you run code. If we made it a conditional step how would we make sure it ran at the very end without depending on any previous steps. I thought of adding all previous steps as a dependency so it runs at the end, but then the end step wouldn't run if any step before that failed.

I tried using the fail step, but I can't provide code. I tried putting it with dependencies but then it won't run if other steps fail before it. I tried putting no dependencies, but then it won't run at the end.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晨曦慕雪 2025-01-26 07:08:05

管道当前没有最终构造这样的构造。任何步骤故障都会立即停止管道。

这可能会在将来添加,但是现在完成此操作的最佳方法是触发Lambda,Sagemaker Pipeline等的EventBridge规则,具有您的失败逻辑。

Pipelines doesn't currently have a finally construct like this. Any step failure will stop the pipeline immediately.

This might be added in the future, but the best way to accomplish this now would be an EventBridge rule on pipeline status change that triggers a Lambda, SageMaker Pipeline, etc which has your failure logic.

SageMaker EventBridge rule

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文