-
Notifications
You must be signed in to change notification settings - Fork 1
/
new_decorator.py.yaml
45 lines (43 loc) · 1.73 KB
/
new_decorator.py.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
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pipeline-hello-world-
annotations: {pipelines.kubeflow.org/kfp_sdk_version: 1.6.2, pipelines.kubeflow.org/pipeline_compilation_time: '2021-06-01T10:55:10.073666',
pipelines.kubeflow.org/pipeline_spec: '{"name": "pipeline_hello_world"}'}
labels: {pipelines.kubeflow.org/kfp_sdk_version: 1.6.2}
spec:
entrypoint: pipeline-hello-world
templates:
- name: op1
container:
args: []
command:
- sh
- -ec
- |
program_path=$(mktemp)
printf "%s" "$0" > "$program_path"
python3 -u "$program_path" "$@"
- |
def op1():
print("hello world")
import argparse
_parser = argparse.ArgumentParser(prog='Op1', description='')
_parsed_args = vars(_parser.parse_args())
_outputs = op1(**_parsed_args)
image: python:3.7
metadata:
labels: {pipelines.kubeflow.org/kfp_sdk_version: 1.6.2, pipelines.kubeflow.org/pipeline-sdk-type: kfp}
annotations: {pipelines.kubeflow.org/component_spec: '{"implementation": {"container":
{"args": [], "command": ["sh", "-ec", "program_path=$(mktemp)\nprintf \"%s\"
\"$0\" > \"$program_path\"\npython3 -u \"$program_path\" \"$@\"\n", "def
op1():\n print(\"hello world\")\n\nimport argparse\n_parser = argparse.ArgumentParser(prog=''Op1'',
description='''')\n_parsed_args = vars(_parser.parse_args())\n\n_outputs
= op1(**_parsed_args)\n"], "image": "python:3.7"}}, "name": "Op1"}', pipelines.kubeflow.org/component_ref: '{}'}
- name: pipeline-hello-world
dag:
tasks:
- {name: op1, template: op1}
arguments:
parameters: []
serviceAccountName: pipeline-runner