Sagemaker 管道 - 条件步骤未按预期工作

问题描述 投票:0回答:1

我正在尝试构建 Sagemaker 管道。我有几个 SparkJarProcessors。我想按顺序运行它。由于每个作业需要超过 40 分钟,我想要一个条件管道,这样,如果每个步骤的输入参数是

True
则运行该步骤,否则转到下一个
ConditionStep

  
step_1 = ProcessingStep(name="ProcessingStep-1", step_args=args, cache_config=cache_config)

step_2 = ProcessingStep(name="ProcessingStep-2", step_args=args, cache_config=cache_config)


step_3 = ProcessingStep(name="ProcessingStep-3", step_args=args, cache_config=cache_config)


step_4= ProcessingStep(name="ProcessingStep-4",args, cache_config=cache_config)

step_cond_4 = ConditionStep(
    name="step4",
    conditions=[cond_aa],
    if_steps=[step4],
    else_steps=[common_base]
)

step_cond_4.add_depends_on([step3])

step_cond_3 = ConditionStep(
    name="step3",
    conditions=[cond_br],
    if_steps=[step3],
    else_steps=[step_cond_4]
)

step_cond_3.add_depends_on([step2])

step_cond_2 = ConditionStep(
    name="step2",
    conditions=[cond_ssdc],
    if_steps=[step2],
    else_steps=[step_cond_3]
)

step_cond_2.add_depends_on([step1])

step_cond_1 = ConditionStep(
    name="step1",
    conditions=[cond_ssd],
    if_steps=[step1],
    else_steps=[step_cond_2]
)

所以在这里,step_cond_1 运行并且永远不会到达step_cond_2(无论输入 - True 或 False)

我做错了什么?是吗-

  1. 我们不能将一个步骤条件调用到另一步骤条件吗?
  2. 当ConditionStep为False时,管道执行不会进入下一步吗?

提前致谢

amazon-web-services amazon-sagemaker
1个回答
0
投票

我们不能将一步条件调用到另一步条件吗?是的 当ConditionStep为False时,管道执行不会进入下一步吗?是的

© www.soinside.com 2019 - 2024. All rights reserved.