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?