-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix pre-mature evaluation of tasks in mapped task group #36462
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
Conversation
|
@avkirilishin can you rebase and resolve conflics? |
|
Can you add this test: |
| # The task has not been expanded yet. Let's help it. | ||
| if self.map_index == -1 and ti_count > 1: | ||
| return range(0, ancestor_ti_count) |
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.
Hmm, I’d prefer we don’t call this function for this case at all instead (i.e. try to ensure the task is expanded).
Also this check is not correct. If ti_count is exactly 1 if the task is mapped (against a list of length 1).
| if ti_needs_expansion and success > 0: | ||
| return |
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 do this outside of the blocks instead of repeating it everywhere? This is both cumbersome and error-prone.
|
@avkirilishin are you still working on this PR? |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
closes: #34023
Redo of the #34337
Relates to #35541 (comment)
@uranusjr Can you please take a look at the approach? I haven't checked the performance yet, but if the approach is okay, I will check it if needed. Perhaps it can be optimized.
And I found that something goes wrong with the example from the
get_relevant_upstream_map_indexesmethod. When I checked the dag:I observed:

Is this the expected behavior?