# PIPELINE DEFINITION # Name: hello-world-pipeline # Description: A simple hello world pipeline to test Kubeflow setup # Inputs: # name: str [Default: 'Kubeflow User'] components: comp-process-greeting: executorLabel: exec-process-greeting inputDefinitions: parameters: greeting: parameterType: STRING outputDefinitions: parameters: Output: parameterType: STRING comp-say-hello: executorLabel: exec-say-hello inputDefinitions: parameters: name: parameterType: STRING outputDefinitions: parameters: Output: parameterType: STRING deploymentSpec: executors: exec-process-greeting: container: args: - --executor_input - '{{$}}' - --function_to_execute - process_greeting 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.15.2'\ \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\ $0\" \"$@\"\n" - sh - -ec - 'program_path=$(mktemp -d) printf "%s" "$0" > "$program_path/ephemeral_component.py" _KFP_RUNTIME=true 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 process_greeting(greeting: str) -> str:\n \"\"\"Process the\ \ greeting message.\"\"\"\n processed = greeting.upper()\n print(f\"\ Processed: {processed}\")\n return processed\n\n" image: python:3.11-slim exec-say-hello: container: args: - --executor_input - '{{$}}' - --function_to_execute - say_hello 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.15.2'\ \ '--no-deps' 'typing-extensions>=3.7.4,<5; python_version<\"3.9\"' && \"\ $0\" \"$@\"\n" - sh - -ec - 'program_path=$(mktemp -d) printf "%s" "$0" > "$program_path/ephemeral_component.py" _KFP_RUNTIME=true 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 say_hello(name: str) -> str:\n \"\"\"Simple component that\ \ returns a greeting.\"\"\"\n message = f\"Hello, {name}! Welcome to\ \ Kubeflow Pipelines.\"\n print(message)\n return message\n\n" image: python:3.11-slim pipelineInfo: description: A simple hello world pipeline to test Kubeflow setup name: hello-world-pipeline root: dag: tasks: process-greeting: cachingOptions: enableCache: true componentRef: name: comp-process-greeting dependentTasks: - say-hello inputs: parameters: greeting: taskOutputParameter: outputParameterKey: Output producerTask: say-hello taskInfo: name: process-greeting say-hello: cachingOptions: enableCache: true componentRef: name: comp-say-hello inputs: parameters: name: componentInputParameter: name taskInfo: name: say-hello inputDefinitions: parameters: name: defaultValue: Kubeflow User isOptional: true parameterType: STRING schemaVersion: 2.1.0 sdkVersion: kfp-2.15.2