Configure failure policy Stay organized with collections Save and categorize content based on your preferences.
You can use thefailure_policy parameter of theaiplatform.PipelineJob class to configure whether a pipeline should fail immediately if one of the task fails.
The following failure policy configurations are supported in Vertex AI Pipelines:
Fail fast (
failure_policy = 'fast'): Choose this configuration if you want the pipeline to stop scheduling new tasks after a task fails. Tasks that are already scheduled continue running until they are completed.Fail slow (
Note: If you don't specify thefailure_policy = 'slow'): Choose this configuration if you want the pipeline to continue to run even after a task fails. The pipeline continues to run until all tasks have been executed.failure_policyparameter for a pipeline, the failure policy configuration is set toslow, by default.
Use the following code sample to configure the failure policy for a pipeline using the Vertex AI SDK for Python:
job=aiplatform.PipelineJob(display_name='DISPLAY_NAME',template_path='COMPILED_PIPELINE_PATH',pipeline_root='PIPELINE_ROOT',project='PROJECT_ID',location='LOCATION',failure_policy='FAILURE_POLICY')Replace the following:
DISPLAY_NAME: The name of the pipeline, this will show up in the Google Cloud console.
COMPILED_PIPELINE_PATH: The path to your compiled pipeline YAML file. It can be a local path or a Google Cloud Storage URI.
PIPELINE_ROOT: Specify a Cloud Storage URI that your pipelines service account can access. The artifacts of your pipeline runs are stored within the pipeline root.
PROJECT_ID: The Google Cloud project that this pipeline runs in.
LOCATION: The region that the pipeline runs in. For more information about the regions that Vertex AI Pipelines is available in, see theVertex AI locations guide. If you don't set this parameter, the default location set in
aiplatform.initis used.FAILURE_POLICY: Specify the failure policy for the entire pipeline. The following configurations are available:
To configure the pipeline to fail after one task fails, enter
fast.To configure the pipeline to continue scheduling tasks after one task fails, enter
slow.
If you don't set this parameter, the failure policy configuration is set to
slow, by default.
What's next
- Learn how toconfigure retries for failed pipeline tasks.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.