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

64 lines
1.8 KiB
YAML

# PIPELINE DEFINITION
# Name: dict-input
# Inputs:
# struct: dict
components:
comp-dict-input:
executorLabel: exec-dict-input
inputDefinitions:
parameters:
struct:
parameterType: STRUCT
deploymentSpec:
executors:
exec-dict-input:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- dict_input
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 dict_input(struct: Dict):\n print(struct)\n\n"
image: python:3.7
pipelineInfo:
name: dict-input
root:
dag:
tasks:
dict-input:
cachingOptions:
enableCache: true
componentRef:
name: comp-dict-input
inputs:
parameters:
struct:
componentInputParameter: struct
taskInfo:
name: dict-input
inputDefinitions:
parameters:
struct:
parameterType: STRUCT
schemaVersion: 2.1.0
sdkVersion: kfp-2.1.3