ray.util.placement_group.PlacementGroup.ready#

PlacementGroup.ready() ray._raylet.ObjectRef[source]#

Returns an ObjectRef to check ready status.

This API returns an ObjectRef that becomes ready when the placement group is created. It is compatible with ray.get, ray.wait, and await.

Example

import ray

pg = ray.util.placement_group([{"CPU": 1}])
ray.get(pg.ready())

pg = ray.util.placement_group([{"CPU": 1}])
ray.wait([pg.ready()])