@@ -50,10 +50,6 @@ class ClusterConfiguration:
5050 The name of the cluster.
5151 namespace:
5252 The namespace in which the cluster should be created.
53- head_cpus:
54- The number of CPUs to allocate to the head node.
55- head_memory:
56- The amount of memory to allocate to the head node.
5753 head_extended_resource_requests:
5854 A dictionary of extended resource requests for the head node. ex: {"nvidia.com/gpu": 1}
5955 head_tolerations:
@@ -104,10 +100,8 @@ class ClusterConfiguration:
104100 namespace : Optional [str ] = None
105101 head_cpu_requests : Union [int , str ] = 2
106102 head_cpu_limits : Union [int , str ] = 2
107- head_cpus : Optional [Union [int , str ]] = None # Deprecating
108103 head_memory_requests : Union [int , str ] = 8
109104 head_memory_limits : Union [int , str ] = 8
110- head_memory : Optional [Union [int , str ]] = None # Deprecating
111105 head_extended_resource_requests : Dict [str , Union [str , int ]] = field (
112106 default_factory = dict
113107 )
@@ -173,10 +167,8 @@ def __post_init__(self):
173167 )
174168
175169 self ._validate_types ()
176- self ._memory_to_resource ()
177170 self ._memory_to_string ()
178171 self ._str_mem_no_unit_add_GB ()
179- self ._cpu_to_resource ()
180172 self ._combine_extended_resource_mapping ()
181173 self ._validate_extended_resource_requests (self .head_extended_resource_requests )
182174 self ._validate_extended_resource_requests (
@@ -209,8 +201,6 @@ def _validate_extended_resource_requests(self, extended_resources: Dict[str, int
209201 )
210202
211203 def _str_mem_no_unit_add_GB (self ):
212- if isinstance (self .head_memory , str ) and self .head_memory .isdecimal ():
213- self .head_memory = f"{ self .head_memory } G"
214204 if (
215205 isinstance (self .worker_memory_requests , str )
216206 and self .worker_memory_requests .isdecimal ()
@@ -232,20 +222,6 @@ def _memory_to_string(self):
232222 if isinstance (self .worker_memory_limits , int ):
233223 self .worker_memory_limits = f"{ self .worker_memory_limits } G"
234224
235- def _cpu_to_resource (self ):
236- if self .head_cpus :
237- warnings .warn (
238- "head_cpus is being deprecated, use head_cpu_requests and head_cpu_limits"
239- )
240- self .head_cpu_requests = self .head_cpu_limits = self .head_cpus
241-
242- def _memory_to_resource (self ):
243- if self .head_memory :
244- warnings .warn (
245- "head_memory is being deprecated, use head_memory_requests and head_memory_limits"
246- )
247- self .head_memory_requests = self .head_memory_limits = self .head_memory
248-
249225 def _validate_types (self ):
250226 """Validate the types of all fields in the ClusterConfiguration dataclass."""
251227 errors = []
0 commit comments