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:

  1. produce_metrics pushes a dict of metrics to XCom.

  2. check_accuracy uses SageMakerConditionOperator to branch: - accuracy >= 0.9 AND loss < 0.1 -> deploy_model - otherwise -> retrain_model

  3. Only the correct branch task runs; the other is skipped.

Attributes

DAG_ID

sys_test_context_task

test_context

test_run

Module Contents

tests.system.amazon.aws.example_sagemaker_condition.DAG_ID = 'example_sagemaker_condition'[source]
tests.system.amazon.aws.example_sagemaker_condition.sys_test_context_task[source]
tests.system.amazon.aws.example_sagemaker_condition.test_context = None[source]
tests.system.amazon.aws.example_sagemaker_condition.test_run[source]

Was this entry helpful?