@@ -54,8 +54,6 @@ class ClusterConfiguration:
5454 The number of CPUs to allocate to the head node.
5555 head_memory:
5656 The amount of memory to allocate to the head node.
57- head_gpus:
58- The number of GPUs to allocate to the head node. (Deprecated, use head_extended_resource_requests)
5957 head_extended_resource_requests:
6058 A dictionary of extended resource requests for the head node. ex: {"nvidia.com/gpu": 1}
6159 head_tolerations:
@@ -70,8 +68,6 @@ class ClusterConfiguration:
7068 The minimum amount of memory to allocate to each worker.
7169 max_memory:
7270 The maximum amount of memory to allocate to each worker.
73- num_gpus:
74- The number of GPUs to allocate to each worker. (Deprecated, use worker_extended_resource_requests)
7571 worker_tolerations:
7672 List of tolerations for worker nodes.
7773 appwrapper:
@@ -120,7 +116,6 @@ class ClusterConfiguration:
120116 head_memory_requests : Union [int , str ] = 8
121117 head_memory_limits : Union [int , str ] = 8
122118 head_memory : Optional [Union [int , str ]] = None # Deprecating
123- head_gpus : Optional [int ] = None # Deprecating
124119 head_extended_resource_requests : Dict [str , Union [str , int ]] = field (
125120 default_factory = dict
126121 )
@@ -134,7 +129,6 @@ class ClusterConfiguration:
134129 worker_memory_limits : Union [int , str ] = 2
135130 min_memory : Optional [Union [int , str ]] = None # Deprecating
136131 max_memory : Optional [Union [int , str ]] = None # Deprecating
137- num_gpus : Optional [int ] = None # Deprecating
138132 worker_tolerations : Optional [List [V1Toleration ]] = None
139133 appwrapper : bool = False
140134 envs : Dict [str , str ] = field (default_factory = dict )
@@ -195,7 +189,6 @@ def __post_init__(self):
195189 self ._memory_to_string ()
196190 self ._str_mem_no_unit_add_GB ()
197191 self ._cpu_to_resource ()
198- self ._gpu_to_resource ()
199192 self ._combine_extended_resource_mapping ()
200193 self ._validate_extended_resource_requests (self .head_extended_resource_requests )
201194 self ._validate_extended_resource_requests (
@@ -227,26 +220,6 @@ def _validate_extended_resource_requests(self, extended_resources: Dict[str, int
227220 f"extended resource '{ k } ' not found in extended_resource_mapping, available resources are { list (self .extended_resource_mapping .keys ())} , to add more supported resources use extended_resource_mapping. i.e. extended_resource_mapping = {{'{ k } ': 'FOO_BAR'}}"
228221 )
229222
230- def _gpu_to_resource (self ):
231- if self .head_gpus :
232- warnings .warn (
233- f"head_gpus is being deprecated, replacing with head_extended_resource_requests['nvidia.com/gpu'] = { self .head_gpus } "
234- )
235- if "nvidia.com/gpu" in self .head_extended_resource_requests :
236- raise ValueError (
237- "nvidia.com/gpu already exists in head_extended_resource_requests"
238- )
239- self .head_extended_resource_requests ["nvidia.com/gpu" ] = self .head_gpus
240- if self .num_gpus :
241- warnings .warn (
242- f"num_gpus is being deprecated, replacing with worker_extended_resource_requests['nvidia.com/gpu'] = { self .num_gpus } "
243- )
244- if "nvidia.com/gpu" in self .worker_extended_resource_requests :
245- raise ValueError (
246- "nvidia.com/gpu already exists in worker_extended_resource_requests"
247- )
248- self .worker_extended_resource_requests ["nvidia.com/gpu" ] = self .num_gpus
249-
250223 def _str_mem_no_unit_add_GB (self ):
251224 if isinstance (self .head_memory , str ) and self .head_memory .isdecimal ():
252225 self .head_memory = f"{ self .head_memory } G"
0 commit comments