@@ -58,16 +58,8 @@ class ClusterConfiguration:
5858 A dictionary of extended resource requests for the head node. ex: {"nvidia.com/gpu": 1}
5959 head_tolerations:
6060 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.
6561 num_workers:
6662 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.
7163 worker_tolerations:
7264 List of tolerations for worker nodes.
7365 appwrapper:
@@ -122,13 +114,9 @@ class ClusterConfiguration:
122114 head_tolerations : Optional [List [V1Toleration ]] = None
123115 worker_cpu_requests : Union [int , str ] = 1
124116 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
127117 num_workers : int = 1
128118 worker_memory_requests : Union [int , str ] = 2
129119 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
132120 worker_tolerations : Optional [List [V1Toleration ]] = None
133121 appwrapper : bool = False
134122 envs : Dict [str , str ] = field (default_factory = dict )
@@ -250,25 +238,13 @@ def _cpu_to_resource(self):
250238 "head_cpus is being deprecated, use head_cpu_requests and head_cpu_limits"
251239 )
252240 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
259241
260242 def _memory_to_resource (self ):
261243 if self .head_memory :
262244 warnings .warn (
263245 "head_memory is being deprecated, use head_memory_requests and head_memory_limits"
264246 )
265247 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"
272248
273249 def _validate_types (self ):
274250 """Validate the types of all fields in the ClusterConfiguration dataclass."""
0 commit comments