tests.system.amazon.aws.example_sagemaker_condition¶
System test for SageMakerConditionOperator.
This operator evaluates conditions against XCom values passed from upstream tasks.
The DAG simulates an ML accuracy-gate workflow:
produce_metricspushes a dict of metrics to XCom.check_accuracyuses SageMakerConditionOperator to branch: - accuracy >= 0.9 AND loss < 0.1 ->deploy_model- otherwise ->retrain_modelOnly the correct branch task runs; the other is skipped.