Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Quando o Vertex AI Pipelines executa um pipeline, ele verifica se há ou não
uma execução nos metadados de ML do ML com a interface (chave de cache) de cada
etapa do pipeline.
A interface da etapa é definida como a combinação do seguinte:
As entradas da etapa do pipeline. Essas entradas incluem o valor dos parâmetros de entrada (se houver) e o ID do artefato de entrada (se houver).
A definição da saída da etapa do pipeline. Essa definição de saída
inclui a definição do parâmetro de saída (nome, se houver) e a definição do artefato
de saída (nome, se houver).
A especificação do componente. Esta especificação inclui imagens, comandos, argumentos e variáveis de ambiente que estão sendo usadas, além de ordem dos comandos e argumentos.
Além disso, apenas os pipelines com o mesmo nome compartilharão o cache.
Se houver uma execução correspondente nos metadados de ML do Vertex, as saídas dessa execução serão usadas e a etapa será ignorada. Isso ajuda a reduzir os custos ignorando os cálculos que foram concluídos em uma execução anterior do pipeline.
Para desativar o armazenamento em cache na execução no nível da tarefa, defina o seguinte:
eval_task.set_caching_options(False)
É possível desativar o armazenamento em cache na execução para um job de pipeline inteiro. Ao executar um pipeline usando PipelineJob(), é possível usar o argumento enable_caching para especificar que essa execução de pipeline não usa o armazenamento em cache. Nenhuma etapa do job de pipeline usará o armazenamento em cache.
Saiba mais sobre como criar execuções de pipeline.
Use o exemplo a seguir para desativar o armazenamento em cache:
pl=PipelineJob(display_name="My first pipeline",# Whether or not to enable caching# True = enable the current run to use caching results from previous runs# False = disable the current run's use of caching results from previous runs# None = defer to cache option for each pipeline component in the pipeline definitionenable_caching=False,# Local or Cloud Storage path to a compiled pipeline definitiontemplate_path="pipeline.yaml",# Dictionary containing input parameters for your pipelineparameter_values=parameter_values,# Cloud Storage path to act as the pipeline rootpipeline_root=pipeline_root,)
As seguintes limitações se aplicam a esse recurso:
O resultado armazenado em cache não tem um time to live (TTL) e pode ser reutilizado, desde que a entrada não seja excluída dos Vertex ML Metadata. Se a entrada for excluída dos Vertex ML Metadata, a tarefa será executada novamente para gerar o resultado novamente.
[[["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-04 UTC."],[],[],null,["# Configure execution caching\n\nWhen Vertex AI Pipelines runs a pipeline, it checks to see whether or not\nan *execution* exists in Vertex ML Metadata with the interface\n(cache key) of each pipeline step.\n\nThe step's interface is defined as the combination of the following:\n\n1. The **pipeline step's inputs**. These inputs include the input\n parameters' value (if any) and the input artifact ID (if any).\n\n2. The **pipeline step's output definition**. This output definition\n includes output parameter definition (name, if any) and output artifact\n definition (name, if any).\n\n3. The **component's specification**. This specification includes the\n image, commands, arguments and environment variables being used, as well\n as the order of the\n commands and arguments.\n\nAdditionally, only the pipelines with the same pipeline name will share the\ncache.\n\nIf there is a matching execution in Vertex ML Metadata, the outputs of\nthat execution are used and the step is skipped. This helps to reduce costs by\nskipping computations that were completed in a previous pipeline run.\n\nYou can turn off execution caching at task level by setting the following: \n\n eval_task.set_caching_options(False)\n\nYou can turn off execution caching for an entire pipeline job. When you run\na pipeline using `PipelineJob()`, you can use the `enable_caching` argument to\nspecify that this pipeline run does not use caching. All steps within the\npipeline job won't use caching.\n[Learn more about creating pipeline runs](/vertex-ai/docs/pipelines/run-pipeline).\n\nUse the following sample to turn off caching: \n\n pl = PipelineJob(\n display_name=\"My first pipeline\",\n\n # Whether or not to enable caching\n # True = enable the current run to use caching results from previous runs\n # False = disable the current run's use of caching results from previous runs\n # None = defer to cache option for each pipeline component in the pipeline definition\n enable_caching=False,\n\n # Local or Cloud Storage path to a compiled pipeline definition\n template_path=\"pipeline.yaml\",\n\n # Dictionary containing input parameters for your pipeline\n parameter_values=parameter_values,\n\n # Cloud Storage path to act as the pipeline root\n pipeline_root=pipeline_root,\n )\n\n| **Important:** Pipeline components should be built to be deterministic. A given set of inputs should always produce the same output. Depending on their interface, non-deterministic pipeline components can be unexpectedly skipped due to execution caching.\n\nThe following limitations apply to this feature:\n\n- The cached result doesn't have a time to live (TTL), and can be reused as long as the entry is not deleted from the Vertex ML Metadata. If the entry is deleted from Vertex ML Metadata, the task will rerun to regenerate the result again."]]