-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv2-test-3params-pipeline-yyjoeli.yaml
72 lines (69 loc) · 2.09 KB
/
v2-test-3params-pipeline-yyjoeli.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
pipelineInfo:
name: test-hello-world-yyjoeli
sdkVersion: kfp-2.0.0-alpha.2
schemaVersion: 2.1.0
deploymentSpec:
executors:
exec-print-op:
container:
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-alpha.2'\
\ && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.components.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 print_op(msg: str, num: int) -> str:\n import time\n print('msg:',\
\ msg)\n time.sleep(num)\n #return msg\n return msg + ' Wait for\
\ ' + str(num) + ' second(s).'\n\n"
image: python:3.7
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- print_op
components:
comp-print-op:
inputDefinitions:
parameters:
num:
parameterType: NUMBER_INTEGER
msg:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
executorLabel: exec-print-op
root:
inputDefinitions:
parameters:
tf:
parameterType: BOOLEAN
sleepTime:
parameterType: NUMBER_INTEGER
userMsg:
parameterType: STRING
dag:
tasks:
print-op:
taskInfo:
name: print-op
inputs:
parameters:
msg:
componentInputParameter: userMsg
num:
runtimeValue:
constant: 0.0
cachingOptions:
enableCache: true
componentRef:
name: comp-print-op