mirror of
https://github.com/wassname/ray.git
synced 2026-08-05 13:21:03 +08:00
[Autoscaler] Fix resource passing bug fix (#10397)
This commit is contained in:
@@ -615,7 +615,8 @@ def test_ray_address_environment_variable(ray_start_cluster):
|
||||
def test_ray_resources_environment_variable(ray_start_cluster):
|
||||
address = ray_start_cluster.address
|
||||
|
||||
os.environ["RAY_OVERRIDE_RESOURCES"] = "{\"custom1\":1, \"custom2\":2}"
|
||||
os.environ[
|
||||
"RAY_OVERRIDE_RESOURCES"] = "{\"custom1\":1, \"custom2\":2, \"CPU\":3}"
|
||||
ray.init(address=address, resources={"custom1": 3, "custom3": 3})
|
||||
|
||||
cluster_resources = ray.cluster_resources()
|
||||
@@ -623,6 +624,7 @@ def test_ray_resources_environment_variable(ray_start_cluster):
|
||||
assert cluster_resources["custom1"] == 1
|
||||
assert cluster_resources["custom2"] == 2
|
||||
assert cluster_resources["custom3"] == 3
|
||||
assert cluster_resources["CPU"] == 3
|
||||
|
||||
|
||||
def test_gpu_info_parsing():
|
||||
|
||||
Reference in New Issue
Block a user