Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Unable to compile pipeline after upgrading to KFP 2.4 #10722

Open
43061b4a opened this issue Apr 22, 2024 · 5 comments
Open

[bug] Unable to compile pipeline after upgrading to KFP 2.4 #10722

43061b4a opened this issue Apr 22, 2024 · 5 comments
Labels

Comments

@43061b4a
Copy link

Environment

I've not made any changes to the code of the KFP pipeline. It compiles successfully with 2.3 but fails to compile with 2.4.
Here's the pipeline code:

from typing import List

from kfp import dsl
from kfp.dsl import component


@component(base_image="python:3.10-slim")
def custom_dummy_op() -> str:
    return "dummy"


@component(base_image="python:3.10-slim-buster")
def run_step(message: list, step: int = 1) -> bool:
    return step in message


@component(base_image="python:3.11.3-slim-buster")
def list_to_json(data: list) -> str:
    import json

    return json.dumps(data)


@dsl.pipeline(name="inference-pipeline")
def inference_pipeline(
        steps: List[int], entity: str, pipeline_mode: str, run_mode: str, models: List[str]
):
    """
    Args:
    Returns:
    """

    step1_run = run_step(message=steps, step=1).set_display_name("RUN 1")
    step2_run = run_step(message=steps, step=2).set_display_name("RUN 2")
    step3_run = run_step(message=steps, step=3).set_display_name("RUN 3")

    "STEP 1"
    with dsl.ExitHandler(
            exit_task=custom_dummy_op().set_display_name("EXIT TASK 1"), name="EXIT STEP 1"
    ) as e1:
        with dsl.If(step1_run.output == True, name="Run Step 1?"):
            custom_dummy_op().set_display_name("Running step 2")

    "STEP 2"
    step2_run.after(e1)

    with dsl.ExitHandler(
            exit_task=custom_dummy_op().set_display_name("EXIT TASK 2"), name="EXIT STEP 2"
    ) as e2:
        with dsl.If(step2_run.output == True, name="Run Step 2?"):
            with dsl.ParallelFor(
                    list_to_json(data=models).output,
                    name="Run Model Scoring",
                    parallelism=2,
            ) as model_run:  # noqa
                custom_dummy_op().set_display_name("RUN MICKY'S COMPONENT HERE")

    "STEP 3"
    step3_run.after(e2)

    with dsl.ExitHandler(
            exit_task=custom_dummy_op().set_display_name("EXIT TASK 3"), name="EXIT STEP 3"
    ):
        with dsl.If(step3_run.output == True, name="Run Step 3?"):
            custom_dummy_op().set_display_name("Running step 3")

Compiled yaml with 2.3:

# PIPELINE DEFINITION
# Name: inference-pipeline
# Description: Args:
#              Returns:
# Inputs:
#    entity: str
#    models: list
#    pipeline_mode: str
#    run_mode: str
#    steps: list
components:
  comp-condition-2:
    dag:
      tasks:
        custom-dummy-op-2:
          cachingOptions:
            enableCache: true
          componentRef:
            name: comp-custom-dummy-op-2
          taskInfo:
            name: Running step 2
    inputDefinitions:
      parameters:
        pipelinechannel--run-step-Output:
          parameterType: BOOLEAN
  comp-condition-4:
    dag:
      tasks:
        for-loop-5:
          componentRef:
            name: comp-for-loop-5
          inputs:
            parameters:
              pipelinechannel--list-to-json-Output:
                taskOutputParameter:
                  outputParameterKey: Output
                  producerTask: list-to-json
              pipelinechannel--run-step-2-Output:
                componentInputParameter: pipelinechannel--run-step-2-Output
          iteratorPolicy:
            parallelismLimit: 2
          parameterIterator:
            itemInput: pipelinechannel--list-to-json-Output-loop-item
            items:
              inputParameter: pipelinechannel--list-to-json-Output
          taskInfo:
            name: Run Model Scoring
        list-to-json:
          cachingOptions:
            enableCache: true
          componentRef:
            name: comp-list-to-json
          inputs:
            parameters:
              data:
                componentInputParameter: pipelinechannel--models
          taskInfo:
            name: list-to-json
    inputDefinitions:
      parameters:
        pipelinechannel--models:
          parameterType: LIST
        pipelinechannel--run-step-2-Output:
          parameterType: BOOLEAN
  comp-condition-7:
    dag:
      tasks:
        custom-dummy-op-6:
          cachingOptions:
            enableCache: true
          componentRef:
            name: comp-custom-dummy-op-6
          taskInfo:
            name: Running step 3
    inputDefinitions:
      parameters:
        pipelinechannel--run-step-3-Output:
          parameterType: BOOLEAN
  comp-custom-dummy-op:
    executorLabel: exec-custom-dummy-op
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-custom-dummy-op-2:
    executorLabel: exec-custom-dummy-op-2
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-custom-dummy-op-3:
    executorLabel: exec-custom-dummy-op-3
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-custom-dummy-op-4:
    executorLabel: exec-custom-dummy-op-4
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-custom-dummy-op-5:
    executorLabel: exec-custom-dummy-op-5
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-custom-dummy-op-6:
    executorLabel: exec-custom-dummy-op-6
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-exit-handler-1:
    dag:
      tasks:
        condition-2:
          componentRef:
            name: comp-condition-2
          inputs:
            parameters:
              pipelinechannel--run-step-Output:
                componentInputParameter: pipelinechannel--run-step-Output
          taskInfo:
            name: Run Step 1?
          triggerPolicy:
            condition: inputs.parameter_values['pipelinechannel--run-step-Output']
              == true
    inputDefinitions:
      parameters:
        pipelinechannel--run-step-Output:
          parameterType: BOOLEAN
  comp-exit-handler-3:
    dag:
      tasks:
        condition-4:
          componentRef:
            name: comp-condition-4
          inputs:
            parameters:
              pipelinechannel--models:
                componentInputParameter: pipelinechannel--models
              pipelinechannel--run-step-2-Output:
                componentInputParameter: pipelinechannel--run-step-2-Output
          taskInfo:
            name: Run Step 2?
          triggerPolicy:
            condition: inputs.parameter_values['pipelinechannel--run-step-2-Output']
              == true
    inputDefinitions:
      parameters:
        pipelinechannel--models:
          parameterType: LIST
        pipelinechannel--run-step-2-Output:
          parameterType: BOOLEAN
  comp-exit-handler-6:
    dag:
      tasks:
        condition-7:
          componentRef:
            name: comp-condition-7
          inputs:
            parameters:
              pipelinechannel--run-step-3-Output:
                componentInputParameter: pipelinechannel--run-step-3-Output
          taskInfo:
            name: Run Step 3?
          triggerPolicy:
            condition: inputs.parameter_values['pipelinechannel--run-step-3-Output']
              == true
    inputDefinitions:
      parameters:
        pipelinechannel--run-step-3-Output:
          parameterType: BOOLEAN
  comp-for-loop-5:
    dag:
      tasks:
        custom-dummy-op-4:
          cachingOptions:
            enableCache: true
          componentRef:
            name: comp-custom-dummy-op-4
          taskInfo:
            name: RUN MICKY'S COMPONENT HERE
    inputDefinitions:
      parameters:
        pipelinechannel--list-to-json-Output:
          parameterType: STRING
        pipelinechannel--list-to-json-Output-loop-item:
          parameterType: STRING
        pipelinechannel--run-step-2-Output:
          parameterType: BOOLEAN
  comp-list-to-json:
    executorLabel: exec-list-to-json
    inputDefinitions:
      parameters:
        data:
          parameterType: LIST
    outputDefinitions:
      parameters:
        Output:
          parameterType: STRING
  comp-run-step:
    executorLabel: exec-run-step
    inputDefinitions:
      parameters:
        message:
          parameterType: LIST
        step:
          defaultValue: 1.0
          isOptional: true
          parameterType: NUMBER_INTEGER
    outputDefinitions:
      parameters:
        Output:
          parameterType: BOOLEAN
  comp-run-step-2:
    executorLabel: exec-run-step-2
    inputDefinitions:
      parameters:
        message:
          parameterType: LIST
        step:
          defaultValue: 1.0
          isOptional: true
          parameterType: NUMBER_INTEGER
    outputDefinitions:
      parameters:
        Output:
          parameterType: BOOLEAN
  comp-run-step-3:
    executorLabel: exec-run-step-3
    inputDefinitions:
      parameters:
        message:
          parameterType: LIST
        step:
          defaultValue: 1.0
          isOptional: true
          parameterType: NUMBER_INTEGER
    outputDefinitions:
      parameters:
        Output:
          parameterType: BOOLEAN
deploymentSpec:
  executors:
    exec-custom-dummy-op:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-custom-dummy-op-2:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-custom-dummy-op-3:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-custom-dummy-op-4:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-custom-dummy-op-5:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-custom-dummy-op-6:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - custom_dummy_op
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef custom_dummy_op() -> str:\n    return \"dummy\"\n\n"
        image: python:3.10-slim
    exec-list-to-json:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - list_to_json
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef list_to_json(data: list) -> str:\n    import json\n\n    return\
          \ json.dumps(data)\n\n"
        image: python:3.11.3-slim-buster
    exec-run-step:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - run_step
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef run_step(message: list, step: int = 1) -> bool:\n    return step\
          \ in message\n\n"
        image: python:3.10-slim-buster
    exec-run-step-2:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - run_step
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef run_step(message: list, step: int = 1) -> bool:\n    return step\
          \ in message\n\n"
        image: python:3.10-slim-buster
    exec-run-step-3:
      container:
        args:
        - --executor_input
        - '{{$}}'
        - --function_to_execute
        - run_step
        command:
        - sh
        - -c
        - "\nif ! [ -x \"$(command -v pip)\" ]; then\n    python3 -m ensurepip ||\
          \ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
          \ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.3.0'\
          \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\
          $0\" \"$@\"\n"
        - sh
        - -ec
        - 'program_path=$(mktemp -d)


          printf "%s" "$0" > "$program_path/ephemeral_component.py"

          _KFP_RUNTIME=true python3 -m kfp.dsl.executor_main                         --component_module_path                         "$program_path/ephemeral_component.py"                         "$@"

          '
        - "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
          \ *\n\ndef run_step(message: list, step: int = 1) -> bool:\n    return step\
          \ in message\n\n"
        image: python:3.10-slim-buster
pipelineInfo:
  description: 'Args:

    Returns:'
  name: inference-pipeline
root:
  dag:
    tasks:
      custom-dummy-op:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-custom-dummy-op
        dependentTasks:
        - exit-handler-1
        taskInfo:
          name: EXIT TASK 1
        triggerPolicy:
          strategy: ALL_UPSTREAM_TASKS_COMPLETED
      custom-dummy-op-3:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-custom-dummy-op-3
        dependentTasks:
        - exit-handler-3
        taskInfo:
          name: EXIT TASK 2
        triggerPolicy:
          strategy: ALL_UPSTREAM_TASKS_COMPLETED
      custom-dummy-op-5:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-custom-dummy-op-5
        dependentTasks:
        - exit-handler-6
        taskInfo:
          name: EXIT TASK 3
        triggerPolicy:
          strategy: ALL_UPSTREAM_TASKS_COMPLETED
      exit-handler-1:
        componentRef:
          name: comp-exit-handler-1
        dependentTasks:
        - run-step
        inputs:
          parameters:
            pipelinechannel--run-step-Output:
              taskOutputParameter:
                outputParameterKey: Output
                producerTask: run-step
        taskInfo:
          name: EXIT STEP 1
      exit-handler-3:
        componentRef:
          name: comp-exit-handler-3
        dependentTasks:
        - run-step-2
        inputs:
          parameters:
            pipelinechannel--models:
              componentInputParameter: models
            pipelinechannel--run-step-2-Output:
              taskOutputParameter:
                outputParameterKey: Output
                producerTask: run-step-2
        taskInfo:
          name: EXIT STEP 2
      exit-handler-6:
        componentRef:
          name: comp-exit-handler-6
        dependentTasks:
        - run-step-3
        inputs:
          parameters:
            pipelinechannel--run-step-3-Output:
              taskOutputParameter:
                outputParameterKey: Output
                producerTask: run-step-3
        taskInfo:
          name: EXIT STEP 3
      run-step:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-run-step
        inputs:
          parameters:
            message:
              componentInputParameter: steps
            step:
              runtimeValue:
                constant: 1.0
        taskInfo:
          name: RUN 1
      run-step-2:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-run-step-2
        dependentTasks:
        - exit-handler-1
        inputs:
          parameters:
            message:
              componentInputParameter: steps
            step:
              runtimeValue:
                constant: 2.0
        taskInfo:
          name: RUN 2
      run-step-3:
        cachingOptions:
          enableCache: true
        componentRef:
          name: comp-run-step-3
        dependentTasks:
        - exit-handler-3
        inputs:
          parameters:
            message:
              componentInputParameter: steps
            step:
              runtimeValue:
                constant: 3.0
        taskInfo:
          name: RUN 3
  inputDefinitions:
    parameters:
      entity:
        parameterType: STRING
      models:
        parameterType: LIST
      pipeline_mode:
        parameterType: STRING
      run_mode:
        parameterType: STRING
      steps:
        parameterType: LIST
schemaVersion: 2.1.0
sdkVersion: kfp-2.3.0

Error when compiling with 2.4:

Error
Traceback (most recent call last):
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/tests/test_inference_pipeline.py", line 30, in test_inference_pipeline_compile
    from predicted_winners_vertex_pipeline.pipelines.inference_pipeline import inference_pipeline
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/predicted_winners_vertex_pipeline/pipelines/inference_pipeline.py", line 25, in <module>
    def inference_pipeline(
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/dsl/pipeline_context.py", line 65, in pipeline
    return component_factory.create_graph_component_from_func(
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/dsl/component_factory.py", line 669, in create_graph_component_from_func
    return graph_component.GraphComponent(
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/dsl/graph_component.py", line 68, in __init__
    pipeline_spec, platform_spec = builder.create_pipeline_spec(
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/compiler/pipeline_spec_builder.py", line 1867, in create_pipeline_spec
    dependencies = compiler_utils.get_dependencies(
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/compiler/compiler_utils.py", line 714, in get_dependencies
    {pipeline.tasks[after_task] for after_task in task.dependent_tasks})
  File "/Users/user/codebase/predicted-winners-vertex-pipeline/.venv/lib/python3.9/site-packages/kfp/compiler/compiler_utils.py", line 714, in <setcomp>
    {pipeline.tasks[after_task] for after_task in task.dependent_tasks})
KeyError: 'exit-handler-1'
  • How do you deploy Kubeflow Pipelines (KFP)?
    We're using Vertex Pipelines for deployment.

  • KFP version:
    2.4.0

  • KFP SDK version:
    2.4.0

Steps to reproduce

  • Above code compiles successfully with KFP 2.3 but fails with 2.4.

Expected result

This code should compile with 2.4. Upgrading to 2.4 should not cause breaking changes.

Materials and reference

Labels


Impacted by this bug? Give it a 👍.

@rimolive
Copy link
Member

Does it break with SDK 2.7.0 too?

@43061b4a 43061b4a changed the title [bug] Unbale to compile pipeline aftergrading to KFP 2.4 [bug] Unable to compile pipeline after upgrading to KFP 2.4 Apr 22, 2024
@43061b4a
Copy link
Author

Yes @rimolive, same error happens with 2.7 as well:

KeyError: 'exit-handler-1'

Copy link

@rimolive: The label(s) /label area/sdk cannot be applied. These labels are supported: tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/label area/sdk

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@43061b4a
Copy link
Author

43061b4a commented Apr 29, 2024

This is still an issue. Adding this comment so this isn't automatically closed.

Because of this bug, devs are pushing back to upgrade or give up on KFP all together.

@43061b4a
Copy link
Author

43061b4a commented May 8, 2024

Any updates here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants