Skip to content

Commit 3d9ebc9

Browse files
Simplify yaml generation by starting from non-AppWrapper template
The v1/beta2 AppWrapper can be wrapped around a RayCluster as a simple prefix to the "real" yaml. So we can simplify yaml generation/manipulation by starting with a vanilla RayCluster and just optionally put it inside an AppWrapper at the end.
1 parent 3864bcf commit 3d9ebc9

File tree

6 files changed

+253
-323
lines changed

6 files changed

+253
-323
lines changed

src/codeflare_sdk/cluster/awload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
class AWManager:
3131
"""
3232
An object for submitting and removing existing AppWrapper yamls
33-
to be added to the MCAD queue.
33+
to be added to the Kueue localqueue.
3434
"""
3535

3636
def __init__(self, filename: str) -> None:

src/codeflare_sdk/cluster/cluster.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ def create_app_wrapper(self):
147147
template = self.config.template
148148
image = self.config.image
149149
appwrapper = self.config.appwrapper
150-
instance_types = self.config.machine_types
151150
env = self.config.envs
152151
image_pull_secrets = self.config.image_pull_secrets
153152
write_to_file = self.config.write_to_file
154-
verify_tls = self.config.verify_tls
155153
local_queue = self.config.local_queue
156154
labels = self.config.labels
157155
return generate_appwrapper(
@@ -169,20 +167,18 @@ def create_app_wrapper(self):
169167
template=template,
170168
image=image,
171169
appwrapper=appwrapper,
172-
instance_types=instance_types,
173170
env=env,
174171
image_pull_secrets=image_pull_secrets,
175172
write_to_file=write_to_file,
176-
verify_tls=verify_tls,
177173
local_queue=local_queue,
178174
labels=labels,
179175
)
180176

181177
# creates a new cluster with the provided or default spec
182178
def up(self):
183179
"""
184-
Applies the AppWrapper yaml, pushing the resource request onto
185-
the MCAD queue.
180+
Applies the Cluster yaml, pushing the resource request onto
181+
the Kueue localqueue.
186182
"""
187183

188184
# check if RayCluster CustomResourceDefinition exists if not throw RuntimeError

0 commit comments

Comments
 (0)