Stay organized with collections
Save and categorize content based on your preferences.
You can use the failure_policy parameter of the aiplatform.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 (failure_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.
Use the following code sample to configure the failure policy for a pipeline using the Vertex AI SDK for Python:
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 the Vertex AI locations guide. If you don't set this parameter, the default location set in aiplatform.init is 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Configure failure policy\n\nYou can use the `failure_policy` parameter of the [`aiplatform.PipelineJob`](/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.PipelineJob) class to configure whether a pipeline should fail immediately if one of the task fails.\n\nThe following failure policy configurations are supported in Vertex AI Pipelines:\n\n- **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.\n\n- **Fail slow** (`failure_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.\n\n | **Note:** If you don't specify the `failure_policy` parameter for a pipeline, the failure policy configuration is set to `slow`, by default.\n\nUse the following code sample to configure the failure policy for a pipeline using the Vertex AI SDK for Python: \n\n\n job = aiplatform.PipelineJob(display_name = '\u003cvar translate=\"no\"\u003eDISPLAY_NAME\u003c/var\u003e',\n template_path = '\u003cvar translate=\"no\"\u003eCOMPILED_PIPELINE_PATH\u003c/var\u003e',\n pipeline_root = '\u003cvar translate=\"no\"\u003ePIPELINE_ROOT\u003c/var\u003e',\n project = '\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e',\n location = '\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e',\n failure_policy = '\u003cvar translate=\"no\"\u003eFAILURE_POLICY\u003c/var\u003e')\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eDISPLAY_NAME\u003c/var\u003e: The name of the pipeline, this will show up in the Google Cloud console.\n\n- \u003cvar translate=\"no\"\u003eCOMPILED_PIPELINE_PATH\u003c/var\u003e: The path to your compiled pipeline YAML file. It can be a local path or a Google Cloud Storage URI.\n\n- \u003cvar translate=\"no\"\u003ePIPELINE_ROOT\u003c/var\u003e: Specify a Cloud Storage URI that your pipelines service account can access. The artifacts of your pipeline runs are stored within the pipeline root.\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The Google Cloud project that this pipeline runs in.\n\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The region that the pipeline runs in. For more information about the regions that Vertex AI Pipelines is available in, see the [Vertex AI locations guide](/vertex-ai/docs/general/locations#feature-availability). If you don't set this parameter, the default location set in `aiplatform.init` is used.\n\n- \u003cvar translate=\"no\"\u003eFAILURE_POLICY\u003c/var\u003e: Specify the failure policy for the entire pipeline. The following configurations are available:\n\n - To configure the pipeline to fail after one task fails, enter `fast`.\n\n - To configure the pipeline to continue scheduling tasks after one task fails, enter `slow`.\n\n If you don't set this parameter, the failure policy configuration is set to `slow`, by default.\n\nWhat's next\n-----------\n\n- Learn how to [configure retries for failed pipeline tasks](/vertex-ai/docs/pipelines/configure-retries)."]]