mirror of
https://github.com/wassname/ray.git
synced 2026-07-15 11:25:40 +08:00
[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user