Skip to content

Commit

Permalink
add support for '{{$.outputs.output_file}}' placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-mccarthy committed Nov 16, 2023
1 parent a0b3037 commit 0c6b0dd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions sdk/RELEASE.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
29 changes: 29 additions & 0 deletions sdk/python/kfp/dsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 0c6b0dd

Please sign in to comment.