Skip to content

Commit 20e6d93

Browse files
update base template with priorities and update cluster
1 parent a1f084c commit 20e6d93

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

src/codeflare_sdk/cluster/cluster.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,9 @@ def create_app_wrapper(self):
8989
instascale = self.config.instascale
9090
instance_types = self.config.machine_types
9191
env = self.config.envs
92-
<<<<<<< HEAD
93-
<<<<<<< HEAD
9492
local_interactive = self.config.local_interactive
9593
image_pull_secrets = self.config.image_pull_secrets
96-
=======
97-
priority = self.config.priority
98-
>>>>>>> 7e7a311 ( add priorities and schedulingSpec to SDK)
99-
=======
10094
dispatch_priority = self.config.dispatch_priority
101-
>>>>>>> b1d1d16 (change 'priority' to 'dispatch priority')
10295
return generate_appwrapper(
10396
name=name,
10497
namespace=namespace,
@@ -113,16 +106,9 @@ def create_app_wrapper(self):
113106
instascale=instascale,
114107
instance_types=instance_types,
115108
env=env,
116-
<<<<<<< HEAD
117-
<<<<<<< HEAD
118109
local_interactive=local_interactive,
119110
image_pull_secrets=image_pull_secrets,
120-
=======
121-
priority=priority,
122-
>>>>>>> 7e7a311 ( add priorities and schedulingSpec to SDK)
123-
=======
124111
dispatch_priority=dispatch_priority,
125-
>>>>>>> b1d1d16 (change 'priority' to 'dispatch priority')
126112
)
127113

128114
# creates a new cluster with the provided or default spec

src/codeflare_sdk/templates/base-template.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ metadata:
88
orderedinstance: "m4.xlarge_g4dn.xlarge"
99
spec:
1010
priority: 9
11+
schedulingSpec:
12+
minAvailable: 3
1113
resources:
1214
Items: []
1315
GenericItems:
@@ -112,6 +114,7 @@ spec:
112114
operator: In
113115
values:
114116
- "aw-kuberay"
117+
priorityClassName: "default-priority"
115118
containers:
116119
# The Ray head pod
117120
- env:
@@ -221,6 +224,7 @@ spec:
221224
operator: In
222225
values:
223226
- "aw-kuberay"
227+
priorityClassName: "default-priority"
224228
initContainers:
225229
# the env var $RAY_IP is set by the operator if missing, with the value of the head service name
226230
- name: init-myservice

tests/test-case.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ spec:
109109
nvidia.com/gpu: 0
110110
imagePullSecrets:
111111
- name: unit-test-pull-secret
112+
priorityClassName: default-priority
112113
rayVersion: 2.1.0
113114
workerGroupSpecs:
114115
- groupName: small-group-unit-test-cluster
@@ -192,7 +193,7 @@ spec:
192193
to:
193194
kind: Service
194195
name: unit-test-cluster-head-svc
195-
replicas: 1
196+
replica: 1
196197
Items: []
197198
schedulingSpec:
198199
minAvailable: 3

0 commit comments

Comments
 (0)