pipelines/sdk/python/test_data/components/identity.yaml

80 lines
2.1 KiB
YAML

# PIPELINE DEFINITION
# Name: identity
# Inputs:
# value: str
# Outputs:
# Output: str
components:
comp-identity:
executorLabel: exec-identity
inputDefinitions:
parameters:
value:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
deploymentSpec:
executors:
exec-identity:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- identity
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.1.3'\
\ '--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 identity(value: str) -> str:\n return value\n\n"
image: python:3.7
pipelineInfo:
name: identity
root:
dag:
outputs:
parameters:
Output:
valueFromParameter:
outputParameterKey: Output
producerSubtask: identity
tasks:
identity:
cachingOptions:
enableCache: true
componentRef:
name: comp-identity
inputs:
parameters:
value:
componentInputParameter: value
taskInfo:
name: identity
inputDefinitions:
parameters:
value:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.1.3