mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 22:20:52 +08:00
[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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user