-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello_world_pipeline.json
94 lines (94 loc) · 2.85 KB
/
hello_world_pipeline.json
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"pipelineSpec": {
"components": {
"comp-hello-world": {
"executorLabel": "exec-hello-world",
"inputDefinitions": {
"parameters": {
"text": {
"type": "STRING"
}
}
},
"outputDefinitions": {
"parameters": {
"Output": {
"type": "STRING"
}
}
}
}
},
"deploymentSpec": {
"executors": {
"exec-hello-world": {
"container": {
"args": [
"--executor_input",
"{{$}}",
"--function_to_execute",
"hello_world"
],
"command": [
"sh",
"-c",
"export PYTHONPATH=\"${PYTHONPATH}:${PWD}\" && mkdir -p my_model && echo \"\"\"class Model:\n @staticmethod\n def hello_world():\n print('Hi, I am being imported in a component')\"\"\" > my_model/dummy_model.py && \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==1.8.14' && \"$0\" \"$@\"\n",
"sh",
"-ec",
"program_path=$(mktemp -d)\nprintf \"%s\" \"$0\" > \"$program_path/ephemeral_component.py\"\npython3 -m kfp.v2.components.executor_main --component_module_path \"$program_path/ephemeral_component.py\" \"$@\"\n",
"\nimport kfp\nfrom kfp.v2 import dsl\nfrom kfp.v2.dsl import *\nfrom typing import *\n\ndef hello_world(text: str) -> str:\n from my_model.dummy_model import Model\n Model.hello_world()\n return text\n\n"
],
"image": "python:3.7"
}
}
}
},
"pipelineInfo": {
"name": "hello-world"
},
"root": {
"dag": {
"tasks": {
"hello-world": {
"cachingOptions": {
"enableCache": true
},
"componentRef": {
"name": "comp-hello-world"
},
"inputs": {
"parameters": {
"text": {
"runtimeValue": {
"constantValue": {
"stringValue": "bla"
}
}
}
}
},
"taskInfo": {
"name": "hello-world"
}
}
}
},
"inputDefinitions": {
"parameters": {
"text": {
"type": "STRING"
}
}
}
},
"schemaVersion": "2.0.0",
"sdkVersion": "kfp-1.8.14"
},
"runtimeConfig": {
"parameters": {
"text": {
"stringValue": "hi there"
}
}
}
}