From dc060dbb7e495753588ee1c6e2b7d03362eb1465 Mon Sep 17 00:00:00 2001 From: IronPan Date: Fri, 8 Nov 2019 13:52:36 -0800 Subject: [PATCH 1/2] Add a minimum sample to print hello world --- samples/core/helloworld/hello_world.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 samples/core/helloworld/hello_world.py diff --git a/samples/core/helloworld/hello_world.py b/samples/core/helloworld/hello_world.py new file mode 100644 index 00000000000..d3b3e6fe87d --- /dev/null +++ b/samples/core/helloworld/hello_world.py @@ -0,0 +1,16 @@ +from kfp import dsl + +def echo_op(): + return dsl.ContainerOp( + name='echo', + image='library/bash:4.4.23', + command=['sh', '-c'], + arguments=['echo "hello world"'] + ) + +@dsl.pipeline( + name='My first pipeline', + description='A hello world pipeline.' +) +def hello_world_pipeline(): + echo_task = echo_op() From c4a0bf49914ccba1ec9761448dfbb746e8f27de0 Mon Sep 17 00:00:00 2001 From: IronPan Date: Fri, 8 Nov 2019 13:53:27 -0800 Subject: [PATCH 2/2] Update hello_world.py --- samples/core/helloworld/hello_world.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/samples/core/helloworld/hello_world.py b/samples/core/helloworld/hello_world.py index d3b3e6fe87d..5eef7f9728f 100644 --- a/samples/core/helloworld/hello_world.py +++ b/samples/core/helloworld/hello_world.py @@ -1,3 +1,17 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from kfp import dsl def echo_op():