diff --git a/sdk/RELEASE.md b/sdk/RELEASE.md index 4ee8405ce4c..352b0bb7fcb 100644 --- a/sdk/RELEASE.md +++ b/sdk/RELEASE.md @@ -1,6 +1,7 @@ # Current Version (in development) ## Features +* Add support for `dsl.PIPELINE_TASK_EXECUTOR_OUTPUT_PATH_PLACEHOLDER` and `dsl.PIPELINE_TASK_EXECUTOR_INPUT_PLACEHOLDER` [\#10240](https://github.com/kubeflow/pipelines/pull/10240) ## Breaking changes diff --git a/sdk/python/kfp/dsl/__init__.py b/sdk/python/kfp/dsl/__init__.py index d2372156c7e..615f0bcf31b 100644 --- a/sdk/python/kfp/dsl/__init__.py +++ b/sdk/python/kfp/dsl/__init__.py @@ -35,6 +35,8 @@ 'PIPELINE_JOB_ID_PLACEHOLDER', 'PIPELINE_TASK_NAME_PLACEHOLDER', 'PIPELINE_TASK_ID_PLACEHOLDER', + 'PIPELINE_TASK_EXECUTOR_OUTPUT_PATH_PLACEHOLDER', + 'PIPELINE_TASK_EXECUTOR_INPUT_PLACEHOLDER', 'PIPELINE_ROOT_PLACEHOLDER', 'PIPELINE_JOB_CREATE_TIME_UTC_PLACEHOLDER', 'PIPELINE_JOB_SCHEDULE_TIME_UTC_PLACEHOLDER', @@ -134,6 +136,33 @@ def my_pipeline(): ) """ +PIPELINE_TASK_EXECUTOR_OUTPUT_PATH_PLACEHOLDER = '{{$.outputs.output_file}}' +"""A placeholder used to obtain the path to the executor_output.json file within the task container. + + Example: + :: + + @dsl.pipeline + def my_pipeline(): + create_artifact_with_metadata( + metadata={'foo': 'bar'}, + executor_output_destination=dsl.PIPELINE_TASK_EXECUTOR_OUTPUT_PATH_PLACEHOLDER, + ) +""" + +PIPELINE_TASK_EXECUTOR_INPUT_PLACEHOLDER = '{{$}}' +"""A placeholder used to obtain executor input message passed to the task. + + Example: + :: + + @dsl.pipeline + def my_pipeline(): + custom_container_op( + executor_input=dsl.PIPELINE_TASK_EXECUTOR_INPUT_PLACEHOLDER, + ) +""" + PIPELINE_ROOT_PLACEHOLDER = '{{$.pipeline_root}}' """A placeholder used to obtain the pipeline root.