Pipeline Conditions and Actions

Create intelligent pipelines that adapt to runtime conditions. Stop execution when models underperform, require human approval before deployment, or branch logic based on metrics.

Why use conditions?

Without conditions, pipelines run every step regardless of results. With conditions, you can:

  • Prevent bad deployments: Stop if model accuracy drops below threshold

  • Save compute costs: Skip expensive steps when unnecessary

  • Add safety checks: Require human review before critical operations

  • Create dynamic workflows: Different paths based on data characteristics

Action structure

Every action has three parts:

actions:
  - when: node-complete      # Trigger event
    if: metadata.accuracy >= 0.95   # Condition (optional)
    then: stop-pipeline      # Action to take

When: Trigger events

  • node-starting: Before a node begins execution

  • node-complete: After successful completion

  • node-error: When a node fails

If: Conditions

Conditions compare values using operators:

  • Comparison: >, >=, <, <=, ==, !=

  • Sources: metadata.key, parameter.name

  • Values: Numbers, strings, booleans

Then: Actions

  • stop-pipeline: Halt entire pipeline execution

  • require-approval: Pause until human approves

Common patterns

Quality gates

Stop pipeline if model doesn't meet standards:

The model only deploys if validation accuracy exceeds 90%.

Human-in-the-loop approval

Require manual review before critical operations:

Conditional processing

Different actions based on data characteristics:

Multi-condition example

Combine multiple conditions for complex logic:

Working with metadata

Generate metadata in your code for conditions:

Use in conditions:

Handling approvals

When a pipeline requires approval:

  1. Email notification sent to project members

  2. Pipeline pauses at the approval point

  3. Review interface shows:

    • Node outputs and logs

    • Metrics that triggered approval

    • Approve/Reject buttons

  4. Decision logged with timestamp and user

Best practices

1. Log decision context

2. Use descriptive metadata keys

Common issues

Condition never triggers

Check metadata is valid JSON:

Approval emails not sent

Ensure project members have notification settings enabled in their profile and the project settings have been configured to send notifications.

Pipeline stops unexpectedly

Add logging before metadata output:

Last updated

Was this helpful?