@@ -248,7 +248,7 @@ def test_config_creation():
248
248
assert config .name == "unit-test-cluster" and config .namespace == "ns"
249
249
assert config .num_workers == 2
250
250
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"
252
252
assert config .num_gpus == 7
253
253
assert config .image == "quay.io/project-codeflare/ray:latest-py39-cu118"
254
254
assert config .template == f"{ parent } /src/codeflare_sdk/templates/base-template.yaml"
@@ -851,8 +851,8 @@ def test_ray_details(mocker, capsys):
851
851
name = "raytest1" ,
852
852
status = RayClusterStatus .READY ,
853
853
workers = 1 ,
854
- worker_mem_min = 2 ,
855
- worker_mem_max = 2 ,
854
+ worker_mem_min = "2G" ,
855
+ worker_mem_max = "2G" ,
856
856
worker_cpu = 1 ,
857
857
worker_gpu = 0 ,
858
858
namespace = "ns" ,
@@ -911,7 +911,7 @@ def test_ray_details(mocker, capsys):
911
911
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
912
912
" │ │ # Workers │ │ Memory CPU GPU │ │ \n "
913
913
" │ │ │ │ │ │ \n "
914
- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
914
+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
915
915
" │ │ │ │ │ │ \n "
916
916
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
917
917
" ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -929,7 +929,7 @@ def test_ray_details(mocker, capsys):
929
929
" │ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │ \n "
930
930
" │ │ # Workers │ │ Memory CPU GPU │ │ \n "
931
931
" │ │ │ │ │ │ \n "
932
- " │ │ 1 │ │ 2~2 1 0 │ │ \n "
932
+ " │ │ 1 │ │ 2G~2G 1 0 │ │ \n "
933
933
" │ │ │ │ │ │ \n "
934
934
" │ ╰─────────────╯ ╰──────────────────────────────────────╯ │ \n "
935
935
" ╰───────────────────────────────────────────────────────────────╯ \n "
@@ -945,7 +945,7 @@ def test_ray_details(mocker, capsys):
945
945
"│ ╭── Workers ──╮ ╭───────── Worker specs(each) ─────────╮ │\n "
946
946
"│ │ # Workers │ │ Memory CPU GPU │ │\n "
947
947
"│ │ │ │ │ │\n "
948
- "│ │ 1 │ │ 2~2 1 0 │ │\n "
948
+ "│ │ 1 │ │ 2G~2G 1 0 │ │\n "
949
949
"│ │ │ │ │ │\n "
950
950
"│ ╰─────────────╯ ╰──────────────────────────────────────╯ │\n "
951
951
"╰───────────────────────────────────────────────────────────────╯\n "
@@ -2438,7 +2438,7 @@ def custom_side_effect(group, version, namespace, plural, **kwargs):
2438
2438
and "g4dn.xlarge" in cluster_config .machine_types
2439
2439
)
2440
2440
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"
2442
2442
assert cluster_config .num_gpus == 0
2443
2443
assert (
2444
2444
cluster_config .image
@@ -2470,7 +2470,7 @@ def test_get_cluster(mocker):
2470
2470
and "g4dn.xlarge" in cluster_config .machine_types
2471
2471
)
2472
2472
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"
2474
2474
assert cluster_config .num_gpus == 0
2475
2475
assert cluster_config .instascale
2476
2476
assert (
0 commit comments