-
Notifications
You must be signed in to change notification settings - Fork 750
[RFC] Tuple IDL #5699
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
[RFC] Tuple IDL #5699
Conversation
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5699 +/- ##
=======================================
Coverage 36.31% 36.31%
=======================================
Files 1304 1304
Lines 110072 110072
=======================================
Hits 39974 39974
Misses 65936 65936
Partials 4162 4162
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rfc/system/4358-tuple-idl.md
Outdated
|
||
### FlytePropeller | ||
|
||
1. Implement a new type checker in [flytepropeller/pkg/compiler/validators/typing.go](https://github.com/flyteorg/flyte/blob/master/flytepropeller/pkg/compiler/validators/typing.go). We need to discuss whether to check the name of each field and the tuple itself, as this will affect the casting between NamedTuple and Tuple. (#TO_DISCUSS) |
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.
We need to discuss whether to check the name of each field and the tuple itself
yup. I think we need it
Signed-off-by: Mecoli1219 <[email protected]>
cc @fg91 I know you want this too |
Signed-off-by: Mecoli1219 <[email protected]>
Yes, I started an incubator discussion about this a while back: #4544. I closed this incubator discussion now in favor of this RFC here (and this one). I 100% support that tuples finally get support in flytekit, python users expect this and have very little understanding for it not being supported 🫠 In the now closed incubator discussion @EngHabu had some thoughts about tuple support in the discussion that probably are of relevance to this discussion here. After having read the RFC, I have to admit that I don't have enough knowledge of flyteidl to judge how exactly the protobuf messages for tuple types should look like though so TL;DR I do very much support the idea but have to defer to somebody else to judge the exact implementation in flyteidl. |
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.
@task
def my_task() -> Tuple[Tuple[int, str], str]:
return (1, "foo"), "bar"
# protobuf: {
# o1: {
# tuple_name: ""
# fields: [
# {name: "", value: 1},
# {name: "", value: "foo"}
# ]
# }
# o2: "bar"
# }
One comment here re: |
Signed-off-by: Mecoli1219 <[email protected]>
I thought Flyte implements multiple outputs for task/workflow (aka tuple-wrapped output) with @fg91 After reading the original incubator discussion, there are some points I would like to address.
I believe that this can be enabled in the future. I have tried to make my implementation close to the multiple outputs structure. I'll create a Pull Request for Flytekit as soon as possible. |
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.
Why int and str tuple key attribute access?
NamedTuple: order(int) and key(str) both supported
Tuple: order(int) only
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
Signed-off-by: Mecoli1219 <[email protected]>
10/24/2024 Contributor's sync notes: looking to have a less controversial approach by not creating a new Literal for Tuple. Michael running experiments |
"Hello 👋, this PR has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this PR as stale and will close the PR if we detect no activity in the next 14 days. Thank you for your contribution and understanding! 🙏" |
Tracking issue
#5908
#1337
#3158
#4358
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link