-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[data] MapOperator.num_active_tasks should exclude pending actors #46364
Conversation
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.
LGTM as a short-term fix, but I'm wondering if there are alternative solutions that could avoid the issue I commented about
@@ -414,6 +414,17 @@ def implements_accurate_memory_accounting(self) -> bool: | |||
def supports_fusion(self) -> bool: | |||
return self._supports_fusion | |||
|
|||
def num_active_tasks(self) -> int: |
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.
If I'm understanding correctly, this change makes len(get_active_tasks()) != num_active_tasks
for map operators. I think that might get confusing.
@raulchen do have any ideas for how we can address the issues while avoiding this discrepancy?
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.
I thought of this as well. It's indeed a bit confusing.
I also thought of separating data and metadata tasks. But that seems overkill.
I think maybe I'll just update the comments to clarify for now.
* Displaying active task info in the progress bar. | ||
Thus, the return value can be less than `len(get_active_tasks())`, | ||
if some tasks are not needed for the above purposes. E.g., for the | ||
actor pool map operator, readiness checking tasks can be excluded |
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.
what is "readiness checking task" referring to in this case?
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.
it's _MapWorker.get_location
.
Why are these changes needed?
MapOperator.num_active_tasks
should exclude the pending actors. BecausePhysicalOperator.completed
checksnum_active_tasks
. The operator should be considered completed if there are still pending actors.Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.