완료, 취소 또는 실패한 머신러닝 (ML) 파이프라인 실행에서 특정 작업을 다시 실행할 수 있습니다. 다시 실행을 시작할 때 태스크 수준 구성을 수정하거나 태스크를 건너뛰도록 선택한 다음 업데이트된 구성을 기반으로 실행을 만들 수 있습니다. 새 파이프라인 실행은 추적 가능성을 위해 원래 파이프라인 실행에 대한 참조를 유지합니다. 이전 실행에서 작업이 성공한 경우 Vertex AI Pipelines는 해당 작업의 캐시된 결과를 재사용합니다. 그렇지 않고 단계가 실패한 경우 Vertex AI Pipelines는 파이프라인 재실행 중에 단계를 실행합니다.
이렇게 하면 전체 ML 파이프라인을 다시 시작하지 않고 ML 파이프라인을 조정하여 ML 파이프라인 실패를 효율적으로 해결할 수 있습니다. 실패한 작업을 조정하거나, 다양한 매개변수 세트로 결과를 비교하거나, 실패하는 중요하지 않은 작업을 건너뛸 수 있습니다.
파이프라인을 다시 실행하는 것은 프로덕션에서 복잡한 ML 파이프라인을 관리하는 MLOps 실무자에게 유용합니다. 이 기능이 유용한 시나리오의 예는 다음과 같습니다.
병렬 프로세스에서 부분적 실패 처리: 대규모 병렬 프로세스의 한 부분이 실패하면 실패한 작업을 건너뛰고 파이프라인의 나머지 부분을 계속 실행할 수 있습니다. 예를 들어 100개 작업 중 하나의 데이터 파이프라인이 실패하면 이를 건너뛸 수 있습니다.
업데이트된 입력 데이터로 작업 다시 실행: 업데이트된 데이터로 단일 작업을 다시 실행해야 하는 경우 해당 작업을 다시 실행할 수 있습니다.
코드 변경 없이 프로덕션 문제 디버깅: 파이프라인 코드 작성자를 포함하지 않고 특정 작업과 해당 작업에 종속된 모든 작업을 다시 실행합니다.
파이프라인 다시 실행
파이프라인을 다시 실행하려면 Python용 Vertex AI SDK를 사용하세요.
Python
다음 샘플을 사용하여 실패한 작업을 건너뛰고 PipelineJob.rerun() 메서드를 사용하여 업데이트된 매개변수로 다른 작업을 다시 실행하여 파이프라인을 다시 실행합니다.
LOCATION: 파이프라인 실행이 있는 리전입니다. Vertex AI Pipelines을 사용할 수 있는 리전에 대한 자세한 내용은 Vertex AI 위치 가이드를 참조하세요.
PIPELINE_RUN_RESOURCE_NAME: 다시 실행하려는 완료, 실패 또는 취소된 파이프라인 실행의 정규화된 리소스 이름입니다.
projects/PROJECT_NUMBER/locations/LOCATION/pipelineJobs/PIPELINE_RUN_ID 형식으로 리소스 이름을 입력합니다. 각 항목의 의미는 다음과 같습니다.
PROJECT_NUMBER: 프로젝트의 프로젝트 번호입니다. 이 프로젝트 번호는 Google Cloud 콘솔에서 찾을 수 있습니다. 자세한 내용은 프로젝트 이름, 번호, ID 찾기를 참고하세요.
PIPELINE_RUN_ID을 다시 실행하려는 파이프라인 실행의 고유 ID로 바꿉니다. ID는 Google Cloud 콘솔의 파이프라인 페이지에 있는 실행 탭에 표시됩니다.
RERUN_TASK_NAME: 업데이트된 매개변수로 다시 실행할 작업의 이름입니다.
SKIP_FAILED_TASK_NAME: 다시 실행하는 동안 건너뛸 실패한 작업의 이름입니다.
TASK_PARAMETER_1 및 TASK_PARAMETER_2: 파이프라인 재실행에서 재정의하려는 작업의 매개변수 이름입니다.
TASK_PARAMETER_1_VALUE 및 TASK_PARAMETER_2_VALUE:
파이프라인 재실행에서 각각 TASK_PARAMETER_1 및 TASK_PARAMETER_2의 새 값입니다.
PIPELINE_PARAMETER_VALUES: 선택사항. 파이프라인 재실행에 사용할 업데이트된 파이프라인 실행 수준 매개변수 값입니다.
RERUN_PIPELINE_JOB_ID: 선택사항. 새 파이프라인 재실행 작업에 할당할 고유 ID입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Rerun a pipeline\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nYou can rerun specific tasks from a completed, cancelled, or failed machine\nlearning (ML) pipeline runs. When you initiate a rerun, you can modify task-level\nconfigurations, or choose to skip tasks, and then create a run based on the\nupdated configuration. The new pipeline run maintains a reference to the\noriginal pipeline run for traceability. If a task succeeded in a prior run,\nVertex AI Pipelines reuses the cached outcomes for that task. Otherwise,\nif the step had failed, Vertex AI Pipelines runs the step during\nthe pipeline rerun.\n\nThis lets you efficiently address ML pipeline failures by making adjustments to\nyour ML pipeline without restarting the entire ML pipeline. You can adjust a\nfailed task, compare outcomes with different sets of parameters, or skip a\nnon-essential task that's failing.\n\nRerunning a pipeline is useful for MLOps practitioners managing complex\nML pipelines in production. Examples of scenarios where it's useful include the\nfollowing:\n\n- **Handling partial failures in parallel processes**: When one part of a\n large parallel process fails, you can skip the failed task and let the remainder\n of the pipeline run continue. For example, if a data pipeline for one out of 100\n tasks fails, you can skip it.\n\n- **Rerunning a task with updated input data**: If a single task needs to be\n rerun with updated data, you can rerun that specific task.\n\n- **Debugging production issues without requiring code changes**: Rerun a\n specific task and all the tasks that depend on it without involving the author\n of the pipeline code.\n\nRerun a pipeline\n----------------\n\nTo rerun a pipeline, use the Vertex AI SDK for Python. \n\n### Python\n\nUse the following sample to rerun a pipeline by skipping a failed task and\nrerunning another task with updated parameters by using the\n`PipelineJob.rerun()` method:\n\n\u003cbr /\u003e\n\n```python\nfrom google.cloud import aiplatform\nfrom google.cloud.aiplatform.preview.pipelinejob.pipeline_jobs import (\n _PipelineJob as PipelineJob\n)\nfrom google.cloud.aiplatform_v1beta1.types.ui_pipeline_spec import RuntimeArtifact\nfrom google.protobuf.struct_pb2 import Value\nfrom google.cloud.aiplatform_v1beta1.types import PipelineTaskRerunConfig\naiplatform.init(project=\"\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\", location=\"\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\")\njob = aiplatform.PipelineJob.get(resource_name=\"\u003cvar translate=\"no\"\u003ePIPELINE_RUN_RESOURCE_NAME\u003c/var\u003e\")\noriginal_job_name = job.resource_name\nrerun_task_id = None\nskip_failed_task_id = None\ntask_inputs_override = PipelineTaskRerunConfig.Inputs(\n parameter_values={\n \"\u003cvar translate=\"no\"\u003eTASK_PARAMETER_1\u003c/var\u003e\": Value(TASK_PARAMETER_1_VALUE),\n \"\u003cvar translate=\"no\"\u003eTASK_PARAMETER_2\u003c/var\u003e\": Value(TASK_PARAMETER_2_VALUE)\n }\n)\nfor task in job.task_details:\n if task.task_name == RERUN_TASK_NAME:\n rerun_task_id = task.task_id\n if task.task_name == SKIP_FAILED_TASK_NAME:\n skip_failed_task_id = task.task_id\npipeline_job.rerun(original_pipelinejob_name=original_job_name,\n pipeline_task_rerun_configs=[\n PipelineTaskRerunConfig(task_id = rerun_task_id,\n skip_task = False,\n inputs = PipelineTaskRerunConfig.Inputs(task_inputs_override)\n ),\n PipelineTaskRerunConfig(task_id = skip_failed_task_id,\n skip_task = True\n )\n ],\n parameter_values=PIPELINE_PARAMETER_VALUES,\n job_id=RERUN_PIPELINE_JOB_ID)\n```\n\n\u003cbr /\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: The Google Cloud project containing the pipeline run.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The region where the pipeline run is located. For more information about the regions where Vertex AI Pipelines is available, see the [Vertex AI locations guide](/vertex-ai/docs/general/locations#feature-availability).\n- \u003cvar translate=\"no\"\u003ePIPELINE_RUN_RESOURCE_NAME\u003c/var\u003e: The fully qualified resource name of\n the completed, failed, or cancelled pipeline run that you want to rerun.\n Enter the resource name in the format\n `projects/`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`/locations/`\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e`/pipelineJobs/`\u003cvar translate=\"no\"\u003ePIPELINE_RUN_ID\u003c/var\u003e, where:\n\n - \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e: The project number for your project. You can locate this project number in the Google Cloud console. For more information, see [Find the project name, number, and ID](/resource-manager/docs/creating-managing-projects#identifying_projects).\n - \u003cvar translate=\"no\"\u003ePIPELINE_RUN_ID\u003c/var\u003e with the unique ID of the pipeline run that you want to rerun. The ID is displayed in the **Runs** tab on the **Pipelines** page in the Google Cloud console.\n- \u003cvar translate=\"no\"\u003eRERUN_TASK_NAME\u003c/var\u003e: The name of the task to rerun with updated parameters.\n- \u003cvar translate=\"no\"\u003eSKIP_FAILED_TASK_NAME\u003c/var\u003e: The name of the failed task to skip during the rerun.\n- \u003cvar translate=\"no\"\u003eTASK_PARAMETER_1\u003c/var\u003e and \u003cvar translate=\"no\"\u003eTASK_PARAMETER_2\u003c/var\u003e: The names of the parameters for the task that you want to override in the pipeline rerun.\n- \u003cvar translate=\"no\"\u003eTASK_PARAMETER_1_VALUE\u003c/var\u003e and \u003cvar translate=\"no\"\u003eTASK_PARAMETER_2_VALUE\u003c/var\u003e: The new values of \u003cvar translate=\"no\"\u003eTASK_PARAMETER_1\u003c/var\u003e and \u003cvar translate=\"no\"\u003eTASK_PARAMETER_2\u003c/var\u003e respectively in the pipeline rerun.\n- \u003cvar translate=\"no\"\u003ePIPELINE_PARAMETER_VALUES\u003c/var\u003e: Optional. The updated pipeline run-level parameter values to use for the pipeline rerun.\n- \u003cvar translate=\"no\"\u003eRERUN_PIPELINE_JOB_ID\u003c/var\u003e: Optional. A unique ID to assign to the new pipeline rerun job.\n\n\u003cbr /\u003e"]]