A team built a SageMaker Pipeline that includes a training step and a model evaluation step. They want to automatically register a model in SageMaker Model Registry only if the evaluation metric (accuracy) exceeds 0.9. Which pipeline step should be used to implement this conditional logic?
Trap 1: RegisterModel step
RegisterModel registers a model version unconditionally once reached; it holds no conditional logic to check accuracy against 0.9. It is tempting because registration is the desired outcome, but that would be correct only when the pipeline already guarantees the metric threshold upstream.
Trap 2: Processing step
A Processing step runs a containerised script over data or artefacts; it cannot branch pipeline execution on a condition. It is tempting because it can read evaluation output, but that would be correct for feature engineering or post-processing, not for gating registration with ConditionStep logic.
Trap 3: Transform step
A Transform step runs batch inference against a model and produces predictions; it cannot evaluate a metric or branch the pipeline. It is tempting because it consumes a trained model, which would be correct for generating batch predictions, not for conditionally registering a model.
- A
RegisterModel step
Why it fails: RegisterModel registers a model version unconditionally once reached; it holds no conditional logic to check accuracy against 0.9. It is tempting because registration is the desired outcome, but that would be correct only when the pipeline already guarantees the metric threshold upstream.
- B
Condition step
A condition step evaluates a property such as the evaluation metric against a threshold and gates downstream steps accordingly. Placing the register step inside its true branch means registration occurs only when accuracy exceeds 0.9, exactly as the stem requires.
- C
Processing step
Why it fails: A Processing step runs a containerised script over data or artefacts; it cannot branch pipeline execution on a condition. It is tempting because it can read evaluation output, but that would be correct for feature engineering or post-processing, not for gating registration with ConditionStep logic.
- D
Transform step
Why it fails: A Transform step runs batch inference against a model and produces predictions; it cannot evaluate a metric or branch the pipeline. It is tempting because it consumes a trained model, which would be correct for generating batch predictions, not for conditionally registering a model.