@@ -38,20 +38,20 @@ class ClusterConfiguration:
38
38
head_info : list = field (default_factory = list )
39
39
head_cpus : typing .Union [int , str ] = 2
40
40
head_memory : typing .Union [int , str ] = 8
41
- head_gpus : int = None
41
+ head_gpus : int = None # Deprecating
42
42
num_head_gpus : int = 0
43
43
machine_types : list = field (default_factory = list ) # ["m4.xlarge", "g4dn.xlarge"]
44
44
worker_cpu_requests : typing .Union [int , str ] = 1
45
45
worker_cpu_limits : typing .Union [int , str ] = 1
46
- min_cpus : typing .Union [int , str ] = None
47
- max_cpus : typing .Union [int , str ] = None
46
+ min_cpus : typing .Union [int , str ] = None # Deprecating
47
+ max_cpus : typing .Union [int , str ] = None # Deprecating
48
48
num_workers : int = 1
49
49
worker_memory_requests : typing .Union [int , str ] = 2
50
50
worker_memory_limits : typing .Union [int , str ] = 2
51
- min_memory : typing .Union [int , str ] = None
52
- max_memory : typing .Union [int , str ] = None
51
+ min_memory : typing .Union [int , str ] = None # Deprecating
52
+ max_memory : typing .Union [int , str ] = None # Deprecating
53
53
num_worker_gpus : int = 0
54
- num_gpus : int = None
54
+ num_gpus : int = None # Deprecating
55
55
template : str = f"{ dir } /templates/base-template.yaml"
56
56
instascale : bool = False
57
57
mcad : bool = False
@@ -68,11 +68,12 @@ def __post_init__(self):
68
68
print (
69
69
"Warning: TLS verification has been disabled - Endpoint checks will be bypassed"
70
70
)
71
+
71
72
self ._memory_to_string ()
72
73
self ._str_mem_no_unit_add_GB ()
74
+ self ._memory_to_resource ()
73
75
self ._gpu_to_resource ()
74
76
self ._cpu_to_resource ()
75
- self ._memory_to_resource ()
76
77
77
78
def _str_mem_no_unit_add_GB (self ):
78
79
if isinstance (self .head_memory , str ) and self .head_memory .isdecimal ():
@@ -115,9 +116,9 @@ def _cpu_to_resource(self):
115
116
def _memory_to_resource (self ):
116
117
if self .min_memory :
117
118
warnings .warn ("min_memory is being deprecated, use worker_memory_requests" )
118
- self .worker_memory_requests = self .min_memory
119
+ self .worker_memory_requests = f" { self .min_memory } G"
119
120
if self .max_memory :
120
121
warnings .warn ("max_memory is being deprecated, use worker_memory_limits" )
121
- self .worker_memory_limits = self .max_memory
122
+ self .worker_memory_limits = f" { self .max_memory } G"
122
123
123
124
local_queue : str = None
0 commit comments