[Autoscaler] Fix resource passing bug fix (#10397)

This commit is contained in:
Alex Wu
2020-08-28 15:43:18 -07:00
committed by GitHub
parent 2afb54c99c
commit b1f3c9e10e
5 changed files with 32 additions and 26 deletions
+3 -1
View File
@@ -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():