@@ -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"
@@ -851,8 +851,8 @@ def test_ray_details(mocker, capsys):
851851 name = "raytest1" ,
852852 status = RayClusterStatus .READY ,
853853 workers = 1 ,
854- worker_mem_min = 2 ,
855- worker_mem_max = 2 ,
854+ worker_mem_min = "2G" ,
855+ worker_mem_max = "2G" ,
856856 worker_cpu = 1 ,
857857 worker_gpu = 0 ,
858858 namespace = "ns" ,
@@ -911,7 +911,7 @@ def test_ray_details(mocker, capsys):
911911 " │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
912912 " │ │ # Workers │ │ Memory CPU GPU │ │ \n "
913913 " │ │ │ │ │ │ \n "
914- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
914+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
915915 " │ │ │ │ │ │ \n "
916916 " │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
917917 " ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -929,7 +929,7 @@ def test_ray_details(mocker, capsys):
929929 " │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
930930 " │ │ # Workers │ │ Memory CPU GPU │ │ \n "
931931 " │ │ │ │ │ │ \n "
932- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
932+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
933933 " │ │ │ │ │ │ \n "
934934 " │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
935935 " ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -945,7 +945,7 @@ def test_ray_details(mocker, capsys):
945945 "│ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │\n "
946946 "│ │ # Workers │ │ Memory CPU GPU │ │\n "
947947 "│ │ │ │ │ │\n "
948- "│ │ 1 │ │ 2~2 1 0 │ │\n "
948+ "│ │ 1 │ │ 2G~2G 1 0 │ │\n "
949949 "│ │ │ │ │ │\n "
950950 "│ ╰─────────────╯ ╰──────────────────────────────────────╯ │\n "
951951 "╰───────────────────────────────────────────────────────────────╯\n "
@@ -2438,7 +2438,7 @@ def custom_side_effect(group, version, namespace, plural, **kwargs):
24382438 and "g4dn.xlarge" in cluster_config .machine_types
24392439 )
24402440 assert cluster_config .min_cpus == 1 and cluster_config .max_cpus == 1
2441- assert cluster_config .min_memory == 2 and cluster_config .max_memory == 2
2441+ assert cluster_config .min_memory == "2G" and cluster_config .max_memory == "2G"
24422442 assert cluster_config .num_gpus == 0
24432443 assert (
24442444 cluster_config .image
@@ -2470,7 +2470,7 @@ def test_get_cluster(mocker):
24702470 and "g4dn.xlarge" in cluster_config .machine_types
24712471 )
24722472 assert cluster_config .min_cpus == 1 and cluster_config .max_cpus == 1
2473- assert cluster_config .min_memory == 2 and cluster_config .max_memory == 2
2473+ assert cluster_config .min_memory == "2G" and cluster_config .max_memory == "2G"
24742474 assert cluster_config .num_gpus == 0
24752475 assert cluster_config .instascale
24762476 assert (
0 commit comments