Skip to content

Commit dfdbac1

Browse files
change 'priority' to 'dispatch priority'
1 parent 98767c7 commit dfdbac1

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/codeflare_sdk/cluster/cluster.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def create_app_wrapper(self):
8484
instascale = self.config.instascale
8585
instance_types = self.config.machine_types
8686
env = self.config.envs
87-
priority = self.config.priority
87+
dispatch_priority = self.config.dispatch_priority
8888
return generate_appwrapper(
8989
name=name,
9090
namespace=namespace,
@@ -99,7 +99,7 @@ def create_app_wrapper(self):
9999
instascale=instascale,
100100
instance_types=instance_types,
101101
env=env,
102-
priority=priority,
102+
dispatch_priority=dispatch_priority,
103103
)
104104

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

src/codeflare_sdk/cluster/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ class ClusterConfiguration:
4848
instascale: bool = False
4949
envs: dict = field(default_factory=dict)
5050
image: str = "ghcr.io/foundation-model-stack/base:ray2.1.0-py38-gpu-pytorch1.12.0cu116-20221213-193103"
51-
priority: str = "low"
51+
dispatch_priority: str = "default"

src/codeflare_sdk/utils/generate_yaml.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def generate_appwrapper(
236236
instascale: bool,
237237
instance_types: list,
238238
env,
239-
priority: str,
239+
dispatch_priority: str,
240240
):
241241
user_yaml = read_template(template)
242242
appwrapper_name, cluster_name = gen_names(name)
@@ -245,7 +245,7 @@ def generate_appwrapper(
245245
route_item = resources["resources"].get("GenericItems")[1]
246246
update_names(user_yaml, item, appwrapper_name, cluster_name, namespace)
247247
update_labels(user_yaml, instascale, instance_types)
248-
update_priority(user_yaml, item, priority)
248+
update_priority(user_yaml, item, dispatch_priority)
249249
update_scheduling_spec(user_yaml, workers)
250250
update_custompodresources(
251251
item, min_cpu, max_cpu, min_memory, max_memory, gpu, workers
@@ -344,10 +344,10 @@ def main(): # pragma: no cover
344344
help="Set the kubernetes namespace you want to deploy your cluster to. Default. If left blank, uses the 'default' namespace",
345345
)
346346
parser.add_argument(
347-
"--priority",
347+
"--dispatch-priority",
348348
required=False,
349-
default="low",
350-
help="Set the priority of the cluster. Default is 'low'. Options are 'low', 'default', 'high'",
349+
default="default",
350+
help="Set the dispatch priority of the framework cluster. Options are 'low', 'default', and 'high'",
351351
)
352352

353353
args = parser.parse_args()
@@ -363,7 +363,7 @@ def main(): # pragma: no cover
363363
instascale = args.instascale
364364
instance_types = args.instance_types
365365
namespace = args.namespace
366-
priority = args.priority
366+
dispatch_priority = args.dispatch_priority
367367
env = {}
368368

369369
outfile = generate_appwrapper(
@@ -380,7 +380,7 @@ def main(): # pragma: no cover
380380
instascale,
381381
instance_types,
382382
env,
383-
priority,
383+
dispatch_priority,
384384
)
385385
return outfile
386386

tests/test-case-cmd.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: unit-cmd-cluster
55
namespace: default
66
spec:
7-
priority: 1
7+
priority: 5
88
resources:
99
GenericItems:
1010
- custompodresources:
@@ -88,7 +88,7 @@ spec:
8888
cpu: 2
8989
memory: 8G
9090
nvidia.com/gpu: 0
91-
priorityClassName: low-priority
91+
priorityClassName: default-priority
9292
rayVersion: 1.12.0
9393
workerGroupSpecs:
9494
- groupName: small-group-unit-cmd-cluster
@@ -137,7 +137,7 @@ spec:
137137
do echo waiting for myservice; sleep 2; done
138138
image: busybox:1.28
139139
name: init-myservice
140-
priorityClassName: low-priority
140+
priorityClassName: default-priority
141141
replicas: 1
142142
- generictemplate:
143143
apiVersion: route.openshift.io/v1

tests/test-case.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
name: unit-test-cluster
77
namespace: ns
88
spec:
9-
priority: 1
9+
priority: 5
1010
resources:
1111
GenericItems:
1212
- custompodresources:
@@ -99,7 +99,7 @@ spec:
9999
cpu: 2
100100
memory: 8G
101101
nvidia.com/gpu: 0
102-
priorityClassName: low-priority
102+
priorityClassName: default-priority
103103
rayVersion: 1.12.0
104104
workerGroupSpecs:
105105
- groupName: small-group-unit-test-cluster
@@ -157,7 +157,7 @@ spec:
157157
do echo waiting for myservice; sleep 2; done
158158
image: busybox:1.28
159159
name: init-myservice
160-
priorityClassName: low-priority
160+
priorityClassName: default-priority
161161
replicas: 1
162162
- generictemplate:
163163
apiVersion: route.openshift.io/v1

0 commit comments

Comments
 (0)