Using placement groups while connecting to Ray cluster

I am experimenting with Ray’s gang scheduling and tried to follow example Placement Groups — Ray v2.0.0.dev0.

I have a Ray cluster running on k8 cluster and is connected to it from local notebook.
Following documentation, I am using the following code:

from ray.util.placement_group import (
placement_group,
placement_group_table,
remove_placement_group
)

Create a placement group.

cpu_bundle1 = {“CPU”: 2}
cpu_bundle2 = {“CPU”: 3}
pg = placement_group([cpu_bundle1, cpu_bundle2] , strategy=“STRICT_PACK”)

Wait until placement group is created.

ray.get(pg.ready())

Look at placement group states using this API.

print(placement_group_table(pg))

which gives me the following error:
RaySystemError: System error: Ray has not been started yet. You can start Ray with ‘ray.init()’.

Does this mean that I can’t create placement groups on the existing cluster?

You should be able to create placement groups on the existing cluster (even if they aren’t placeable it should not give an exception).

I believe this is an issue because the placement_group_table API is not supported with the Ray Client (ray.util.connect). Could you please file an issue for this on GitHub? cc @Ameer_Haj_Ali

Yeah, placement groups is currently not supported in ray client. There is an issue on github tracking this.

Thanks, is there an ETA for this?

Unfortunately, not yet. I’d probably say Q2/Q3.