Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wenn Vertex AI Pipelines eine Pipeline ausführt, wird geprüft, ob in Vertex ML Metadata eine Ausführung mit der Schnittstelle (Cache-Schlüssel) jedes Pipelineschritts vorhanden ist.
Die Schnittstelle des Schritts wird als Kombination aus Folgendem definiert:
Eingaben des Pipelineschritts Dazu gehören der Wert der Eingabeparameter (falls vorhanden) und die ID des Eingabeartefakts (falls vorhanden).
Die Ausgabedefinition des Pipelineschritts. Diese Ausgabedefinition enthält die Definition des Ausgabeparameters (Name, falls zutreffend) und die Definition des Ausgabeartefakts (Name, falls zutreffend).
Die Spezifikation der Komponente. Diese Spezifikation enthält das verwendete Image, die Befehle, Argumente und Umgebungsvariablen sowie die Reihenfolge der Befehle und Argumente.
Außerdem teilen sich nur Pipelines mit demselben Pipelinenamen den Cache.
Wenn in den Vertex ML Metadata eine übereinstimmende Ausführung vorhanden ist, werden die Ausgaben dieser Ausführung verwendet und der Schritt übersprungen. Dadurch können Kosten gespart werden, da Berechnungen, die bei einer vorherigen Pipelineausführung abgeschlossen wurden, übersprungen werden.
Sie können das Ausführungs-Caching auf Aufgabenebene deaktivieren, indem Sie Folgendes festlegen:
eval_task.set_caching_options(False)
Sie können das Ausführungs-Caching für einen gesamten Pipeline-Job deaktivieren. Wenn Sie eine Pipeline mit PipelineJob() ausführen, können Sie mit dem Argument enable_caching angeben, dass diese Pipeline-Ausführung kein Caching verwendet. Für alle Schritte innerhalb des Pipelinejobs wird kein Caching verwendet.
Weitere Informationen zum Erstellen von Pipeline-Ausführungen
Verwenden Sie das folgende Beispiel, um das Caching zu deaktivieren:
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,)
Für dieses Feature gelten die folgenden Einschränkungen:
Das im Cache gespeicherte Ergebnis hat keine Gültigkeitsdauer (TTL) und kann wiederverwendet werden, solange der Eintrag nicht aus Vertex ML Metadata gelöscht wird. Wenn der Eintrag aus Vertex ML Metadata gelöscht wird, wird die Aufgabe noch einmal ausgeführt, um das Ergebnis neu zu generieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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."]]