-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.yaml
80 lines (76 loc) · 2.2 KB
/
pipeline.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# PIPELINE DEFINITION
# Name: hello-pipeline
# Inputs:
# recipient: str
# Outputs:
# Output: str
components:
comp-say-hello:
executorLabel: exec-say-hello
inputDefinitions:
parameters:
name:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
deploymentSpec:
executors:
exec-say-hello:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- say_hello
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.9.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 say_hello(name: str) -> str:\n hello_text = f'Hello, {name}!'\n\
\ print(hello_text)\n return hello_text\n\n"
image: python:3.8
pipelineInfo:
name: hello-pipeline
root:
dag:
outputs:
parameters:
Output:
valueFromParameter:
outputParameterKey: Output
producerSubtask: say-hello
tasks:
say-hello:
cachingOptions:
enableCache: true
componentRef:
name: comp-say-hello
inputs:
parameters:
name:
componentInputParameter: recipient
taskInfo:
name: say-hello
inputDefinitions:
parameters:
recipient:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.9.0