[Placement Group] Capture child tasks by default. (#11025)

* In progress.

* Finished up.

* Improve comment.

* Addressed code review.

* Fix test failure.

* Fix ci failures.

* Fix CI issues.
This commit is contained in:
SangBin Cho
2020-09-27 19:33:00 -07:00
committed by GitHub
parent f0787a63da
commit 1e39c40370
28 changed files with 282 additions and 47 deletions
+12
View File
@@ -54,6 +54,18 @@ class RuntimeContext(object):
"""
return self.worker.placement_group_id
@property
def should_capture_child_tasks_in_placement_group(self):
"""Get if the current task should capture parent's placement group.
This returns True if it is called inside a driver.
Returns:
Return True if the current task should implicitly
capture the parent placement group.
"""
return self.worker.should_capture_child_tasks_in_placement_group
_runtime_context = None