@@ -137,12 +137,12 @@ def create_app_wrapper(self):
137
137
namespace = self .config .namespace
138
138
head_cpus = self .config .head_cpus
139
139
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
146
146
workers = self .config .num_workers
147
147
template = self .config .template
148
148
image = self .config .image
@@ -157,12 +157,12 @@ def create_app_wrapper(self):
157
157
namespace = namespace ,
158
158
head_cpus = head_cpus ,
159
159
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 ,
166
166
workers = workers ,
167
167
template = template ,
168
168
image = image ,
@@ -318,7 +318,7 @@ def status(
318
318
319
319
if print_to_console :
320
320
# overriding the number of gpus with requested
321
- cluster .worker_gpu = self .config .num_gpus
321
+ cluster .worker_gpu = self .config .num_worker_gpus
322
322
pretty_print .print_cluster_status (cluster )
323
323
elif print_to_console :
324
324
if status == CodeFlareClusterStatus .UNKNOWN :
@@ -474,19 +474,19 @@ def from_k8_cluster_object(
474
474
namespace = rc ["metadata" ]["namespace" ],
475
475
machine_types = machine_types ,
476
476
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" ][
478
478
"containers"
479
479
][0 ]["resources" ]["requests" ]["cpu" ],
480
- max_cpus = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
480
+ worker_cpu_limits = rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ][
481
481
"containers"
482
482
][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" ][
487
487
"containers"
488
488
][0 ]["resources" ]["limits" ]["memory" ],
489
- num_gpus = int (
489
+ num_worker_gpus = int (
490
490
rc ["spec" ]["workerGroupSpecs" ][0 ]["template" ]["spec" ]["containers" ][0 ][
491
491
"resources"
492
492
]["limits" ]["nvidia.com/gpu" ]
@@ -917,15 +917,15 @@ def _copy_to_ray(cluster: Cluster) -> RayCluster:
917
917
name = cluster .config .name ,
918
918
status = cluster .status (print_to_console = False )[0 ],
919
919
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 ,
924
924
namespace = cluster .config .namespace ,
925
925
dashboard = cluster .cluster_dashboard_uri (),
926
926
head_cpus = cluster .config .head_cpus ,
927
927
head_mem = cluster .config .head_memory ,
928
- head_gpu = cluster .config .head_gpus ,
928
+ head_gpu = cluster .config .num_head_gpus ,
929
929
)
930
930
if ray .status == CodeFlareClusterStatus .READY :
931
931
ray .status = RayClusterStatus .READY
0 commit comments