[Placement Group] Capture Child Task Part 1 (#10968)

* In progress.

* In progers.

* Done.

* Addressed code review.

* Increase timeout to make a test less flaky.

* Addressed code review.

* Addressed code review.
This commit is contained in:
SangBin Cho
2020-09-24 09:02:03 -07:00
committed by GitHub
parent 46a560e876
commit 5e6b887f2d
11 changed files with 197 additions and 16 deletions
+9
View File
@@ -45,6 +45,15 @@ class RuntimeContext(object):
actor_info = ray.state.actors(self.current_actor_id.hex())
return actor_info and actor_info["NumRestarts"] != 0
@property
def current_placement_group_id(self):
"""Get the current Placement group ID of this worker.
Returns:
The current placement group id of this worker.
"""
return self.worker.placement_group_id
_runtime_context = None