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

chore(sdk): update golden snapshots with pipeline interface comments #8575

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
4 changes: 2 additions & 2 deletions sdk/python/test_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Tests the compiler (write) and load (read) functionality of the SDK. This ensure
These tests require golden snapshots of pipelines and components against with compiled pipelines are compared. To update pipeline golden snapshots:

```bash
for f in sdk/python/kfp/compiler/test_data/pipelines/*.py ; do echo "$f" && python3 "$f" ; done
for f in sdk/python/test_data/pipelines/*.py ; do echo "$f" && python3 "$f" ; done
```


To update component golden snapshots:
```bash
for f in sdk/python/kfp/compiler/test_data/components/*.py ; do echo "$f" && python3 "$f" ; done
for f in sdk/python/test_data/components/*.py ; do echo "$f" && python3 "$f" ; done
```


Expand Down
9 changes: 7 additions & 2 deletions sdk/python/test_data/components/add_numbers.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# PIPELINE DEFINITION
# Name: add-numbers
# Inputs:
# a: int
# b: int
components:
comp-add-numbers:
executorLabel: exec-add-numbers
Expand Down Expand Up @@ -25,7 +30,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -64,4 +69,4 @@ root:
b:
parameterType: NUMBER_INTEGER
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: component-with-pip-install
components:
comp-component-with-pip-install:
executorLabel: exec-component-with-pip-install
Expand All @@ -17,7 +19,7 @@ deploymentSpec:
\ 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 --index-url\
\ https://pypi.org/simple --trusted-host https://pypi.org/simple 'yapf'\
\ 'kfp==2.0.0-alpha.5' && \"$0\" \"$@\"\n"
\ 'kfp==2.0.0-beta.8' && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
Expand All @@ -44,4 +46,4 @@ root:
taskInfo:
name: component-with-pip-install
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
9 changes: 7 additions & 2 deletions sdk/python/test_data/components/concat_message.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# PIPELINE DEFINITION
# Name: concat-message
# Inputs:
# message1: str
# message2: str
components:
comp-concat-message:
executorLabel: exec-concat-message
Expand Down Expand Up @@ -25,7 +30,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -65,4 +70,4 @@ root:
message2:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
6 changes: 5 additions & 1 deletion sdk/python/test_data/components/container_io.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: container-io
# Inputs:
# text: str
components:
comp-container-io:
executorLabel: exec-container-io
Expand Down Expand Up @@ -41,4 +45,4 @@ root:
text:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.1
sdkVersion: kfp-2.0.0-beta.8
4 changes: 3 additions & 1 deletion sdk/python/test_data/components/container_no_input.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: container-no-input
components:
comp-container-no-input:
executorLabel: exec-container-no-input
Expand All @@ -22,4 +24,4 @@ root:
taskInfo:
name: container-no-input
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.1
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: container-with-artifact-output
# Inputs:
# num_epochs: int
components:
comp-container-with-artifact-output:
executorLabel: exec-container-with-artifact-output
Expand Down Expand Up @@ -52,4 +56,4 @@ root:
num_epochs:
parameterType: NUMBER_INTEGER
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.2
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: container-with-concat-placeholder
# Inputs:
# text1: str
components:
comp-container-with-concat-placeholder:
executorLabel: exec-container-with-concat-placeholder
Expand Down Expand Up @@ -46,4 +50,4 @@ root:
text1:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.1
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: container-with-if-placeholder
# Inputs:
# optional_input: str [Default: 'default']
components:
comp-container-with-if-placeholder:
executorLabel: exec-container-with-if-placeholder
Expand Down Expand Up @@ -52,4 +56,4 @@ root:
defaultValue: default
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.1
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: container-with-placeholder-in-fstring
# Inputs:
# text1: str [Default: 'text!']
components:
comp-container-with-placeholder-in-fstring:
executorLabel: exec-container-with-placeholder-in-fstring
Expand Down Expand Up @@ -43,4 +47,4 @@ root:
defaultValue: text!
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.6
sdkVersion: kfp-2.0.0-beta.8
8 changes: 6 additions & 2 deletions sdk/python/test_data/components/dict_input.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: dict-input
# Inputs:
# struct: dict
components:
comp-dict-input:
executorLabel: exec-dict-input
Expand All @@ -19,7 +23,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -54,4 +58,4 @@ root:
struct:
parameterType: STRUCT
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
8 changes: 6 additions & 2 deletions sdk/python/test_data/components/identity.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: identity
# Inputs:
# value: str
components:
comp-identity:
executorLabel: exec-identity
Expand All @@ -23,7 +27,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -58,4 +62,4 @@ root:
value:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
8 changes: 6 additions & 2 deletions sdk/python/test_data/components/input_artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# PIPELINE DEFINITION
# Name: input-artifact
# Inputs:
# data: system.Dataset
components:
comp-input-artifact:
executorLabel: exec-input-artifact
Expand All @@ -21,7 +25,7 @@ deploymentSpec:
- -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.1'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -59,4 +63,4 @@ root:
schemaTitle: system.Dataset
schemaVersion: 0.0.1
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.1
sdkVersion: kfp-2.0.0-beta.8
6 changes: 4 additions & 2 deletions sdk/python/test_data/components/nested_return.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: nested-return
components:
comp-nested-return:
executorLabel: exec-nested-return
Expand All @@ -19,7 +21,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -47,4 +49,4 @@ root:
taskInfo:
name: nested-return
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
9 changes: 7 additions & 2 deletions sdk/python/test_data/components/output_metrics.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# PIPELINE DEFINITION
# Name: output-metrics
# Description: Dummy component that outputs metrics with a random accuracy.
# Outputs:
# output-metrics-metrics: system.Metrics
components:
comp-output-metrics:
executorLabel: exec-output-metrics
Expand All @@ -21,7 +26,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -63,4 +68,4 @@ root:
schemaTitle: system.Metrics
schemaVersion: 0.0.1
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
11 changes: 9 additions & 2 deletions sdk/python/test_data/components/preprocess.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# PIPELINE DEFINITION
# Name: preprocess
# Description: Dummy preprocessing step.
# Inputs:
# input_dict_parameter: dict
# input_list_parameter: list
# message: str
components:
comp-preprocess:
executorLabel: exec-preprocess
Expand Down Expand Up @@ -42,7 +49,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -111,4 +118,4 @@ root:
message:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: v2-component-optional-input
components:
comp-component-op:
executorLabel: exec-component-op
Expand All @@ -22,7 +24,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -61,4 +63,4 @@ root:
taskInfo:
name: component-op
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: v2-component-pip-index-urls
components:
comp-component-op:
executorLabel: exec-component-op
Expand All @@ -17,7 +19,7 @@ deploymentSpec:
\ 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 --index-url\
\ https://pypi.org/simple --trusted-host https://pypi.org/simple 'yapf'\
\ 'kfp==2.0.0-alpha.5' && \"$0\" \"$@\"\n"
\ 'kfp==2.0.0-beta.8' && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
Expand All @@ -43,4 +45,4 @@ root:
taskInfo:
name: component-op
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# PIPELINE DEFINITION
# Name: v2-container-component-no-input
components:
comp-hello-world-container:
executorLabel: exec-hello-world-container
Expand All @@ -22,4 +24,4 @@ root:
taskInfo:
name: hello-world-container
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-beta.0
sdkVersion: kfp-2.0.0-beta.8
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# PIPELINE DEFINITION
# Name: my-test-pipeline-beta
# Inputs:
# input_dict: dict [Default: {'A': 1.0, 'B': 2.0}]
# message: str
components:
comp-preprocess:
executorLabel: exec-preprocess
Expand Down Expand Up @@ -73,7 +78,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -125,7 +130,7 @@ deploymentSpec:
- -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-alpha.5'\
\ python3 -m pip install --quiet --no-warn-script-location 'kfp==2.0.0-beta.8'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
Expand Down Expand Up @@ -232,4 +237,4 @@ root:
message:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.0-alpha.5
sdkVersion: kfp-2.0.0-beta.8
Loading