Skip to content

[Placement group] Associate the lifetime of the placement group with the current driver / actor #11347

@ericl

Description

@ericl

Currently, there is no way to manage the lifetime of placement groups. The most general solution is to manage placement groups similar to actor lifetimes (can be detached, ref-counted, or associated with job). Implementation wise, the simplest way to do this is to just fate-share the placement group with the current driver/actor. This is similar to how you can achieve detached task lifetimes-- by launching them from a detached actor.

It works as follows:

  1. When a placement group is created, include the current actor ID [if any] / job ID in the creation message sent to the GCS.
  2. When the GCS destroys the (actor, job) pair, also destroy the placement group.

We can also provide syntactic sugar in the future do support something like ray.placement_group(lifetime="detached"), by launching a dummy detached actor under the hood.

Metadata

Metadata

Assignees

Labels

P1Issue that should be fixed within a few weeksenhancementRequest for new feature and/or capability

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions