-
Notifications
You must be signed in to change notification settings - Fork 287
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
added node index to current_context #2812
base: master
Are you sure you want to change the base?
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
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.
mind adding a small unit test in this file?
https://github.com/flyteorg/flytekit/blob/f394bc95b94798e856649a2b07e2d87528ebd2cb/tests/flytekit/unit/bin/test_python_entrypoint.py#L342-L341
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2812 +/- ##
===========================================
- Coverage 81.34% 53.11% -28.24%
===========================================
Files 196 226 +30
Lines 20324 21818 +1494
Branches 2619 2613 -6
===========================================
- Hits 16533 11588 -4945
- Misses 3063 9704 +6641
+ Partials 728 526 -202 ☔ View full report in Codecov by Sentry. |
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.
Could you run make fmt
locally to fix the lint error?
Will write an unit test and will run formatter too |
i have run make fmt |
Tracking issue
Closes flyteorg/flyte#5534
Why are the changes needed?
In Flyte, when working with map tasks, outputs often risk being overwritten if they share the same static name. For example, if multiple nodes generate output files with the same name, only the last file would remain, as previous ones would be overwritten. By adding the array node index, it becomes possible to uniquely name these outputs, avoiding conflicts.
What changes were proposed in this pull request?
The key goal of this PR is to include the index of an array node in map_tasks within the current_context() returned value. This feature is especially useful when multiple nodes within a map task could potentially overwrite outputs