mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 22:08:16 +08:00
[Placement group] Input validation (#11152)
* Add a basic input validation. * Addressed code review.
This commit is contained in:
@@ -32,11 +32,17 @@ def test_placement_group_pack(ray_start_cluster):
|
||||
ray.init(address=cluster.address)
|
||||
|
||||
placement_group = ray.util.placement_group(
|
||||
name="name", strategy="PACK", bundles=[{
|
||||
"CPU": 2
|
||||
}, {
|
||||
"CPU": 2
|
||||
}])
|
||||
name="name",
|
||||
strategy="PACK",
|
||||
bundles=[
|
||||
{
|
||||
"CPU": 2,
|
||||
"GPU": 0 # Test 0 resource spec doesn't break tests.
|
||||
},
|
||||
{
|
||||
"CPU": 2
|
||||
}
|
||||
])
|
||||
ray.get(placement_group.ready())
|
||||
actor_1 = Actor.options(
|
||||
placement_group=placement_group,
|
||||
|
||||
Reference in New Issue
Block a user