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

fix(backend): Update compiler with new test sdk and fix dag publisher execution id #1425

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions backend/src/v2/compiler/tektoncompiler/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,12 @@ func (i *pubDagDriverInputs) getDagType() string {
return "DAG_PUB"
}

// pubDagDriverInputs getParentDagID returns the parent node of the DAG publisher
// which should always be the DAG driver DAG ID. However, exit handler doesn't
// have driver so it's point to the root DAG ID instead.
func (i *pubDagDriverInputs) getParentDagID(isExitHandler bool) string {
if i.parentDagID == "" {
return "0"
}
if isExitHandler && i.parentDagID == compiler.RootComponentName {
return fmt.Sprintf("$(params.%s)", paramParentDagID)
} else if i.inLoopDag {
return fmt.Sprintf("$(params.%s)", paramParentDagID)
} else {
return taskOutputParameter(getDAGDriverTaskName(i.parentDagID), paramExecutionID)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pipelineSpec:
- -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.0.0-beta.12'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -127,7 +127,7 @@ pipelineSpec:
- -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.0.0-beta.12'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -156,7 +156,7 @@ pipelineSpec:
- -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.0.0-beta.12'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -183,7 +183,7 @@ pipelineSpec:
- -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.0.0-beta.12'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -210,7 +210,7 @@ pipelineSpec:
- -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.0.0-beta.12'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -285,4 +285,4 @@ pipelineSpec:
isOptional: true
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.12
sdkVersion: kfp-2.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","print_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.0.0-beta.6''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp
-d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3
-m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -97,7 +97,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.6' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down Expand Up @@ -205,7 +205,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","fail_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.0.0-beta.6''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d)\nprintf
\"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m
kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -258,7 +258,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.6' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down Expand Up @@ -347,7 +347,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","print_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.0.0-beta.6''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d)\nprintf
\"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m
kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -400,7 +400,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.6' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down Expand Up @@ -512,8 +512,8 @@ spec:
- name: mlmd-server-port
value: "8080"
runAfter:
- fail-op
- print-op-2
- fail-op
taskRef:
apiVersion: custom.tekton.dev/v1alpha1
kind: KFPTask
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pipelineSpec:
- -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.0.0-beta.6'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -89,7 +89,7 @@ pipelineSpec:
- -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.0.0-beta.6'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -116,7 +116,7 @@ pipelineSpec:
- -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.0.0-beta.6'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -167,4 +167,4 @@ pipelineSpec:
defaultValue: Hello World!
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.6
sdkVersion: kfp-2.0.1
14 changes: 7 additions & 7 deletions backend/src/v2/compiler/tektoncompiler/testdata/loop_static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
- name: run-id
value: $(context.pipelineRun.uid)
- name: dag-execution-id
value: $(params.parent-dag-id)
value: $(tasks.for-loop-2-loop-dag-driver.results.execution-id)
- name: mlmd-server-address
value: metadata-grpc-service.kubeflow.svc.cluster.local
- name: mlmd-server-port
Expand All @@ -98,7 +98,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","concat_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.0.0-beta.15''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp
-d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3
-m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -152,7 +152,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.15' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down Expand Up @@ -239,7 +239,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","print_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.0.0-beta.15''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp
-d)\nprintf \"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3
-m kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -295,7 +295,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.15' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down Expand Up @@ -427,7 +427,7 @@ spec:
value: '{"args":["--executor_input","{{$}}","--function_to_execute","print_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.0.0-beta.15''
python3 -m pip install --quiet --no-warn-script-location ''kfp==2.0.1''
\u0026\u0026 \"$0\" \"$@\"\n","sh","-ec","program_path=$(mktemp -d)\nprintf
\"%s\" \"$0\" \u003e \"$program_path/ephemeral_component.py\"\npython3 -m
kfp.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n","\nimport
Expand Down Expand Up @@ -480,7 +480,7 @@ spec:
python3 -m ensurepip || python3 -m ensurepip --user || apt-get install python3-pip
fi

PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.15' && "$0" "$@"
PIP_DISABLE_PIP_VERSION_CHECK=1 python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1' && "$0" "$@"
- sh
- -ec
- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pipelineSpec:
- -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.0.0-beta.15'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -114,7 +114,7 @@ pipelineSpec:
- -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.0.0-beta.15'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand All @@ -141,7 +141,7 @@ pipelineSpec:
- -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.0.0-beta.15'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.1'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -188,4 +188,4 @@ pipelineSpec:
isOptional: true
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.15
sdkVersion: kfp-2.0.1
Loading
Loading