Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): add v2 placeholder variables #6693

Merged
merged 3 commits into from
Oct 6, 2021

Conversation

ji-yaqi
Copy link
Contributor

@ji-yaqi ji-yaqi commented Oct 6, 2021

No description provided.

PIPELINE_JOB_RESOURCE_NAME_PLACEHOLDER = '{{$.pipeline_job_resource_name}}'
PIPELINE_JOB_ID_PLACEHOLDER = '{{$.pipeline_job_uuid}}'
# RUN_ID_PLACEHOLDER is deprecated.
RUN_ID_PLACEHOLDER = '{{$.pipeline_job_uuid}}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the plan for RUN_ID_PLACEHOLDER? If we want to deprecate it in v2, we shouldn't add it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

sdk/RELEASE.md Outdated
@@ -2,6 +2,8 @@

## Major Features and Improvements

* Add placeholder variables [\#6693](https://github.com/kubeflow/pipelines/pull/6693)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: v2 placeholder variables

Same for the PR title.

@ji-yaqi ji-yaqi changed the title feat(sdk): add placeholder variables feat(sdk): add v2 placeholder variables Oct 6, 2021
@google-oss-robot
Copy link

@ji-yaqi: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-samples-v2 3c1dae7 link true /test kubeflow-pipelines-samples-v2

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@chensun
Copy link
Member

chensun commented Oct 6, 2021

/lgtm
/approve

Thanks!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chensun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@chensun
Copy link
Member

chensun commented Oct 6, 2021

/kubeflow-pipelines-samples-v2 test is failing due to some known infra issue, and this PR shouldn't affect the that tests.
So merging the PR manually.

@chensun chensun merged commit a2cdf74 into kubeflow:master Oct 6, 2021
@judahrand
Copy link
Contributor

{{$.pipeline_task_name}} and {{$.pipeline_task_uuid}} don't seem to work on Vertex AI at the moment (not sure about a self hosted KFP). Is this expected? I've also tried various placeholders to try to access the Pipeline job's status/error (eg. {{$.error}}, {{$.status}}, {{$.error.code}}, etc.) and nothing seems to work. How is this templating working and how does it differ from the old Argo templating?

@ji-yaqi
Copy link
Contributor Author

ji-yaqi commented Oct 25, 2021

{{$.pipeline_task_name}} and {{$.pipeline_task_uuid}} don't seem to work on Vertex AI at the moment (not sure about a self hosted KFP). Is this expected? I've also tried various placeholders to try to access the Pipeline job's status/error (eg. {{$.error}}, {{$.status}}, {{$.error.code}}, etc.) and nothing seems to work. How is this templating working and how does it differ from the old Argo templating?

Hi @judahrand, the usage would be like:

@dsl.pipeline(name=f'test-pipeline-1008-{USER}')
def my_pipeline():
    print_op(msg=dsl.PIPELINE_JOB_NAME_PLACEHOLDER)
    print_op(msg=dsl.PIPELINE_JOB_RESOURCE_NAME_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_JOB_ID_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_TASK_NAME_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_TASK_ID_PLACEHOLDER) 

Is this the way you were using this feature?

@judahrand
Copy link
Contributor

{{$.pipeline_task_name}} and {{$.pipeline_task_uuid}} don't seem to work on Vertex AI at the moment (not sure about a self hosted KFP). Is this expected? I've also tried various placeholders to try to access the Pipeline job's status/error (eg. {{$.error}}, {{$.status}}, {{$.error.code}}, etc.) and nothing seems to work. How is this templating working and how does it differ from the old Argo templating?

Hi @judahrand, the usage would be like:

@dsl.pipeline(name=f'test-pipeline-1008-{USER}')
def my_pipeline():
    print_op(msg=dsl.PIPELINE_JOB_NAME_PLACEHOLDER)
    print_op(msg=dsl.PIPELINE_JOB_RESOURCE_NAME_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_JOB_ID_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_TASK_NAME_PLACEHOLDER) 
    print_op(msg=dsl.PIPELINE_TASK_ID_PLACEHOLDER) 

Is this the way you were using this feature?

Yes, that's what I was doing. The task specific placeholders did not work while the job specific ones did.

Do you have any suggestions for alternatives to {{workflow.status}}? This seems like a crucial thing to be able to access for error handling in an exit handler.

@ji-yaqi ji-yaqi deleted the pipeline_placeholder branch October 26, 2021 17:56
@ji-yaqi
Copy link
Contributor Author

ji-yaqi commented Oct 26, 2021

Hi @judahrand, I tried to reproduce this on KFP 1.8.6 and PIPELINE_TASK_NAME_PLACEHOLDER and PIPELINE_TASK_ID_PLACEHOLDER works (shown in arguments).

For {{workflow.status}}, you can use the string as is. If you think extra is needed, could you file an issue? Thanks!

@judahrand
Copy link
Contributor

Perhaps this is a Vertex specific issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants