-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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): support collections of params/artifacts for component I/O. Addresses #10840 #11219
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @zazulam. Thanks for your PR. I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Currently, there is an issue when attempting to pull a task's output and resolve it during the downstream tasks when |
/ok-to-test |
/rerun-all |
Signed-off-by: zazulam <[email protected]>
43e5121
to
b3f1d79
Compare
Signed-off-by: zazulam <[email protected]>
b3f1d79
to
a5aff6d
Compare
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.
Have a minor comment for code, but I think we should get aligned on the feature first. I have a few questions, I'll comment in the issue.
@@ -82,6 +82,220 @@ def to_protobuf_value(value: type_utils.PARAMETER_TYPES) -> struct_pb2.Value: | |||
f'"{value}" of type "{type(value)}".') | |||
|
|||
|
|||
def check_task_input_types(input_value, input_name, pipeline_task_spec, task, |
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.
By exacting the code into a function, it's hard to tell what are the actual diffs. Can you please edit in place without creating this method?
Description of your changes:
This PR is intended to address issue #10840.
In v1, users were able to dynamically collect and store variables of component outputs and pass references to those pipeline parameter types at compilation time to downstream components. This allowed for a dynamic pipeline generation, however with the release of v2 this capability was not available with the new compiler.
The major piece was that elements in lists & dicts did not have their types checked, so the compiler inferred their types were python primitives and attempted to pull the corresponding protobuf value.
The approach for the solution was to add separate conditions for lists and dicts and check the types on their inputs separate from the primitive catch all here
pipelines/sdk/python/kfp/compiler/pipeline_spec_builder.py
Line 241 in 581b7e5
Here is a sample showcasing this new capability:
Associated IR
Checklist: