@@ -58,16 +58,8 @@ class ClusterConfiguration:
58
58
A dictionary of extended resource requests for the head node. ex: {"nvidia.com/gpu": 1}
59
59
head_tolerations:
60
60
List of tolerations for head nodes.
61
- min_cpus:
62
- The minimum number of CPUs to allocate to each worker.
63
- max_cpus:
64
- The maximum number of CPUs to allocate to each worker.
65
61
num_workers:
66
62
The number of workers to create.
67
- min_memory:
68
- The minimum amount of memory to allocate to each worker.
69
- max_memory:
70
- The maximum amount of memory to allocate to each worker.
71
63
worker_tolerations:
72
64
List of tolerations for worker nodes.
73
65
appwrapper:
@@ -122,13 +114,9 @@ class ClusterConfiguration:
122
114
head_tolerations : Optional [List [V1Toleration ]] = None
123
115
worker_cpu_requests : Union [int , str ] = 1
124
116
worker_cpu_limits : Union [int , str ] = 1
125
- min_cpus : Optional [Union [int , str ]] = None # Deprecating
126
- max_cpus : Optional [Union [int , str ]] = None # Deprecating
127
117
num_workers : int = 1
128
118
worker_memory_requests : Union [int , str ] = 2
129
119
worker_memory_limits : Union [int , str ] = 2
130
- min_memory : Optional [Union [int , str ]] = None # Deprecating
131
- max_memory : Optional [Union [int , str ]] = None # Deprecating
132
120
worker_tolerations : Optional [List [V1Toleration ]] = None
133
121
appwrapper : bool = False
134
122
envs : Dict [str , str ] = field (default_factory = dict )
@@ -250,25 +238,13 @@ def _cpu_to_resource(self):
250
238
"head_cpus is being deprecated, use head_cpu_requests and head_cpu_limits"
251
239
)
252
240
self .head_cpu_requests = self .head_cpu_limits = self .head_cpus
253
- if self .min_cpus :
254
- warnings .warn ("min_cpus is being deprecated, use worker_cpu_requests" )
255
- self .worker_cpu_requests = self .min_cpus
256
- if self .max_cpus :
257
- warnings .warn ("max_cpus is being deprecated, use worker_cpu_limits" )
258
- self .worker_cpu_limits = self .max_cpus
259
241
260
242
def _memory_to_resource (self ):
261
243
if self .head_memory :
262
244
warnings .warn (
263
245
"head_memory is being deprecated, use head_memory_requests and head_memory_limits"
264
246
)
265
247
self .head_memory_requests = self .head_memory_limits = self .head_memory
266
- if self .min_memory :
267
- warnings .warn ("min_memory is being deprecated, use worker_memory_requests" )
268
- self .worker_memory_requests = f"{ self .min_memory } G"
269
- if self .max_memory :
270
- warnings .warn ("max_memory is being deprecated, use worker_memory_limits" )
271
- self .worker_memory_limits = f"{ self .max_memory } G"
272
248
273
249
def _validate_types (self ):
274
250
"""Validate the types of all fields in the ClusterConfiguration dataclass."""
0 commit comments