Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
É possível usar o parâmetro failure_policy da classe aiplatform.PipelineJob para configurar se um pipeline falhará imediatamente se uma das tarefas falhar.
As configurações de política de falha a seguir são suportadas com os pipelines da Vertex AI:
Falha rápida (failure_policy = 'fast'): escolha essa configuração se quiser que o pipeline pare de programar novas tarefas se uma tarefa falhar. As tarefas já programadas continuam em execução até serem concluídas.
Falha lenta (failure_policy = 'slow'): escolha essa configuração se você quiser que o pipeline continue em execução mesmo depois que uma tarefa falhar. O pipeline continua em execução até que todas as tarefas tenham sido executadas.
Use o exemplo de código a seguir para configurar a política de falha de um pipeline usando o SDK Vertex AI para Python:
DISPLAY_NAME: o nome do pipeline, que é mostrado no console do Google Cloud .
COMPILED_PIPELINE_PATH: o caminho para o arquivo YAML do pipeline compilado. Pode ser um caminho local ou um URI do Google Cloud Storage.
PIPELINE_ROOT: especifique um URI do Cloud Storage que sua
conta de serviço de pipelines possa acessar. Os artefatos das execuções de pipeline são armazenados na raiz do pipeline.
PROJECT_ID: o projeto Google Cloud em que este pipeline é executado.
LOCATION: a região em que o pipeline é executado. Para mais informações sobre as regiões em que o Pipelines da Vertex AI está disponível, consulte o guia de locais da Vertex AI. Se você não definir esse parâmetro, o local padrão definido em aiplatform.init é usado.
FAILURE_POLICY: especifica a política de falha para todo o pipeline. As seguintes configurações estão disponíveis:
Para configurar o pipeline para falhar se uma tarefa falhar, digite fast.
Para configurar o pipeline de modo a continuar a programar tarefas se uma tarefa falhar, insira slow.
Se você não definir o parâmetro, a configuração da política de falha é definida como slow, por padrão.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-02 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)."]]