@@ -248,7 +248,7 @@ def test_config_creation():
248248 assert config .name == "unit-test-cluster" and config .namespace == "ns"
249249 assert config .num_workers == 2
250250 assert config .min_cpus == 3 and config .max_cpus == 4
251- assert config .min_memory == 5 and config .max_memory == 6
251+ assert config .min_memory == "5G" and config .max_memory == "6G"
252252 assert config .num_gpus == 7
253253 assert config .image == "quay.io/project-codeflare/ray:latest-py39-cu118"
254254 assert config .template == f"{ parent } /src/codeflare_sdk/templates/base-template.yaml"
@@ -849,8 +849,8 @@ def test_ray_details(mocker, capsys):
849849 name = "raytest1" ,
850850 status = RayClusterStatus .READY ,
851851 workers = 1 ,
852- worker_mem_min = 2 ,
853- worker_mem_max = 2 ,
852+ worker_mem_min = "2G" ,
853+ worker_mem_max = "2G" ,
854854 worker_cpu = 1 ,
855855 worker_gpu = 0 ,
856856 namespace = "ns" ,
@@ -909,7 +909,7 @@ def test_ray_details(mocker, capsys):
909909 " │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
910910 " │ │ # Workers │ │ Memory CPU GPU │ │ \n "
911911 " │ │ │ │ │ │ \n "
912- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
912+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
913913 " │ │ │ │ │ │ \n "
914914 " │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
915915 " ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -927,7 +927,7 @@ def test_ray_details(mocker, capsys):
927927 " │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
928928 " │ │ # Workers │ │ Memory CPU GPU │ │ \n "
929929 " │ │ │ │ │ │ \n "
930- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
930+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
931931 " │ │ │ │ │ │ \n "
932932 " │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
933933 " ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -943,7 +943,7 @@ def test_ray_details(mocker, capsys):
943943 "│ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │\n "
944944 "│ │ # Workers │ │ Memory CPU GPU │ │\n "
945945 "│ │ │ │ │ │\n "
946- "│ │ 1 │ │ 2~2 1 0 │ │\n "
946+ "│ │ 1 │ │ 2G~2G 1 0 │ │\n "
947947 "│ │ │ │ │ │\n "
948948 "│ ╰─────────────╯ ╰──────────────────────────────────────╯ │\n "
949949 "╰───────────────────────────────────────────────────────────────╯\n "
@@ -2436,7 +2436,7 @@ def custom_side_effect(group, version, namespace, plural, **kwargs):
24362436 and "g4dn.xlarge" in cluster_config .machine_types
24372437 )
24382438 assert cluster_config .min_cpus == 1 and cluster_config .max_cpus == 1
2439- assert cluster_config .min_memory == 2 and cluster_config .max_memory == 2
2439+ assert cluster_config .min_memory == "2G" and cluster_config .max_memory == "2G"
24402440 assert cluster_config .num_gpus == 0
24412441 assert (
24422442 cluster_config .image
@@ -2468,7 +2468,7 @@ def test_get_cluster(mocker):
24682468 and "g4dn.xlarge" in cluster_config .machine_types
24692469 )
24702470 assert cluster_config .min_cpus == 1 and cluster_config .max_cpus == 1
2471- assert cluster_config .min_memory == 2 and cluster_config .max_memory == 2
2471+ assert cluster_config .min_memory == "2G" and cluster_config .max_memory == "2G"
24722472 assert cluster_config .num_gpus == 0
24732473 assert cluster_config .instascale
24742474 assert (
0 commit comments