-
Notifications
You must be signed in to change notification settings - Fork 0
/
hello_world_pipeline.yaml
70 lines (67 loc) · 2.05 KB
/
hello_world_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
# PIPELINE DEFINITION
# Name: hello-world-pipeline
# Description: Test pipeline.
# Inputs:
# name: str [Default: 'default']
components:
comp-hello-world:
executorLabel: exec-hello-world
inputDefinitions:
parameters:
name:
parameterType: STRING
outputDefinitions:
parameters:
Output:
parameterType: STRING
deploymentSpec:
executors:
exec-hello-world:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- hello_world
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 'loguru'\
\ 'kfp-dsl==2.1.2' && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
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 hello_world(name: str) -> str:\n \"\"\"Print Hello World!\"\
\"\"\n from loguru import logger\n\n logger.info(f\"Hello {name}!\"\
)\n return \"Hello World!\"\n\n"
image: python:3.9
pipelineInfo:
description: Test pipeline.
name: hello-world-pipeline
root:
dag:
tasks:
hello-world:
cachingOptions:
enableCache: true
componentRef:
name: comp-hello-world
inputs:
parameters:
name:
componentInputParameter: name
taskInfo:
name: hello-world
inputDefinitions:
parameters:
name:
defaultValue: default
parameterType: STRING
schemaVersion: 2.1.0
sdkVersion: kfp-2.1.2