@@ -137,12 +137,12 @@ def create_app_wrapper(self):
137137 namespace = self .config .namespace
138138 head_cpus = self .config .head_cpus
139139 head_memory = self .config .head_memory
140- head_gpus = self .config .head_gpus
141- min_cpu = self .config .min_cpus
142- max_cpu = self .config .max_cpus
143- min_memory = self .config .min_memory
144- max_memory = self .config .max_memory
145- gpu = self .config .num_gpus
140+ num_head_gpus = self .config .num_head_gpus
141+ worker_cpu_requests = self .config .worker_cpu_requests
142+ worker_cpu_limits = self .config .worker_cpu_limits
143+ worker_memory_requests = self .config .worker_memory_requests
144+ worker_memory_limits = self .config .worker_memory_limits
145+ num_worker_gpus = self .config .num_worker_gpus
146146 workers = self .config .num_workers
147147 template = self .config .template
148148 image = self .config .image
@@ -157,12 +157,12 @@ def create_app_wrapper(self):
157157 namespace = namespace ,
158158 head_cpus = head_cpus ,
159159 head_memory = head_memory ,
160- head_gpus = head_gpus ,
161- min_cpu = min_cpu ,
162- max_cpu = max_cpu ,
163- min_memory = min_memory ,
164- max_memory = max_memory ,
165- gpu = gpu ,
160+ num_head_gpus = num_head_gpus ,
161+ worker_cpu_requests = worker_cpu_requests ,
162+ worker_cpu_limits = worker_cpu_limits ,
163+ worker_memory_requests = worker_memory_requests ,
164+ worker_memory_limits = worker_memory_limits ,
165+ num_worker_gpus = num_worker_gpus ,
166166 workers = workers ,
167167 template = template ,
168168 image = image ,
@@ -318,7 +318,7 @@ def status(
318318
319319 if print_to_console :
320320 # overriding the number of gpus with requested
321- cluster .worker_gpu = self .config .num_gpus
321+ cluster .worker_gpu = self .config .num_worker_gpus
322322 pretty_print .print_cluster_status (cluster )
323323 elif print_to_console :
324324 if status == CodeFlareClusterStatus .UNKNOWN :
@@ -474,19 +474,19 @@ def from_k8_cluster_object(
474474 namespace = rc ["metadata" ]["namespace" ],
475475 machine_types = machine_types ,
476476 num_workers = rc ["spec" ]["workerGroupSpecs" ][0 ]["minReplicas" ],
477- min_cpus = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
477+ worker_cpu_requests = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
478478 "containers"
479479 ][0 ]["resources" ]["requests" ]["cpu" ],
480- max_cpus = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
480+ worker_cpu_limits = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
481481 "containers"
482482 ][0 ]["resources" ]["limits" ]["cpu" ],
483- min_memory = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ][ "spec " ][
484- "containers "
485- ][0 ]["resources" ]["requests" ]["memory" ],
486- max_memory = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
483+ worker_memory_requests = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ][
484+ "spec "
485+ ]["containers" ][ 0 ]["resources" ]["requests" ]["memory" ],
486+ worker_memory_limits = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
487487 "containers"
488488 ][0 ]["resources" ]["limits" ]["memory" ],
489- num_gpus = int (
489+ num_worker_gpus = int (
490490 rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ]["containers" ][0 ][
491491 "resources"
492492 ]["limits" ]["nvidia.com/gpu" ]
@@ -917,15 +917,15 @@ def _copy_to_ray(cluster: Cluster) -> RayCluster:
917917 name = cluster .config .name ,
918918 status = cluster .status (print_to_console = False )[0 ],
919919 workers = cluster .config .num_workers ,
920- worker_mem_min = cluster .config .min_memory ,
921- worker_mem_max = cluster .config .max_memory ,
922- worker_cpu = cluster .config .min_cpus ,
923- worker_gpu = cluster .config .num_gpus ,
920+ worker_mem_min = cluster .config .worker_memory_requests ,
921+ worker_mem_max = cluster .config .worker_memory_limits ,
922+ worker_cpu = cluster .config .worker_cpu_requests ,
923+ worker_gpu = cluster .config .num_worker_gpus ,
924924 namespace = cluster .config .namespace ,
925925 dashboard = cluster .cluster_dashboard_uri (),
926926 head_cpus = cluster .config .head_cpus ,
927927 head_mem = cluster .config .head_memory ,
928- head_gpu = cluster .config .head_gpus ,
928+ head_gpu = cluster .config .num_head_gpus ,
929929 )
930930 if ray .status == CodeFlareClusterStatus .READY :
931931 ray .status = RayClusterStatus .READY
0 commit comments