@@ -54,8 +54,6 @@ class ClusterConfiguration:
54
54
The number of CPUs to allocate to the head node.
55
55
head_memory:
56
56
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)
59
57
head_extended_resource_requests:
60
58
A dictionary of extended resource requests for the head node. ex: {"nvidia.com/gpu": 1}
61
59
head_tolerations:
@@ -70,8 +68,6 @@ class ClusterConfiguration:
70
68
The minimum amount of memory to allocate to each worker.
71
69
max_memory:
72
70
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)
75
71
worker_tolerations:
76
72
List of tolerations for worker nodes.
77
73
appwrapper:
@@ -120,7 +116,6 @@ class ClusterConfiguration:
120
116
head_memory_requests : Union [int , str ] = 8
121
117
head_memory_limits : Union [int , str ] = 8
122
118
head_memory : Optional [Union [int , str ]] = None # Deprecating
123
- head_gpus : Optional [int ] = None # Deprecating
124
119
head_extended_resource_requests : Dict [str , Union [str , int ]] = field (
125
120
default_factory = dict
126
121
)
@@ -134,7 +129,6 @@ class ClusterConfiguration:
134
129
worker_memory_limits : Union [int , str ] = 2
135
130
min_memory : Optional [Union [int , str ]] = None # Deprecating
136
131
max_memory : Optional [Union [int , str ]] = None # Deprecating
137
- num_gpus : Optional [int ] = None # Deprecating
138
132
worker_tolerations : Optional [List [V1Toleration ]] = None
139
133
appwrapper : bool = False
140
134
envs : Dict [str , str ] = field (default_factory = dict )
@@ -195,7 +189,6 @@ def __post_init__(self):
195
189
self ._memory_to_string ()
196
190
self ._str_mem_no_unit_add_GB ()
197
191
self ._cpu_to_resource ()
198
- self ._gpu_to_resource ()
199
192
self ._combine_extended_resource_mapping ()
200
193
self ._validate_extended_resource_requests (self .head_extended_resource_requests )
201
194
self ._validate_extended_resource_requests (
@@ -227,26 +220,6 @@ def _validate_extended_resource_requests(self, extended_resources: Dict[str, int
227
220
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'}}"
228
221
)
229
222
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
-
250
223
def _str_mem_no_unit_add_GB (self ):
251
224
if isinstance (self .head_memory , str ) and self .head_memory .isdecimal ():
252
225
self .head_memory = f"{ self .head_memory } G"
0 commit comments