@@ -44,6 +44,7 @@ def launch_job(
4444 command : list [str ],
4545 clusters : list [str ] | None = None ,
4646 hostname : str | None = None ,
47+ priority : BeakerJobPriority = BeakerJobPriority .high ,
4748) -> None :
4849 """Launch a Beaker job that materializes the rslearn dataset.
4950
@@ -53,6 +54,7 @@ def launch_job(
5354 clusters: optional list of Beaker clusters to target. One of hostname or
5455 clusters must be set.
5556 hostname: optional Beaker host to constrain to.
57+ priority: the priority to assign to the Beaker job.
5658 """
5759 with Beaker .from_env (default_workspace = DEFAULT_WORKSPACE ) as beaker :
5860 experiment_name = str (uuid .uuid4 ())[0 :16 ]
@@ -93,7 +95,7 @@ def launch_job(
9395 budget = DEFAULT_BUDGET ,
9496 task_name = experiment_name ,
9597 beaker_image = image ,
96- priority = BeakerJobPriority . high ,
98+ priority = priority ,
9799 command = command ,
98100 datasets = [
99101 weka_mount ,
@@ -116,6 +118,7 @@ def launch_jobs(
116118 num_jobs : int | None = None ,
117119 hosts : list [str ] | None = None ,
118120 command : list [str ] | None = None ,
121+ priority : BeakerJobPriority = BeakerJobPriority .high ,
119122) -> None :
120123 """Launch Beaker jobs to materialize an rslearn dataset.
121124
@@ -129,6 +132,7 @@ def launch_jobs(
129132 hosts: optional list of Beaker hosts to launch jobs on (one job per host),
130133 as an alternative to specifying clusters+num_jobs.
131134 command: override the default materialization command.
135+ priority: the priority to assign to the Beaker jobs.
132136 """
133137 if (clusters is not None and hosts is not None ) or (
134138 clusters is None and hosts is None
@@ -150,6 +154,7 @@ def launch_jobs(
150154 image = image ,
151155 command = command ,
152156 clusters = clusters ,
157+ priority = priority ,
153158 )
154159
155160 else :
@@ -158,4 +163,5 @@ def launch_jobs(
158163 image = image ,
159164 command = command ,
160165 hostname = host ,
166+ priority = priority ,
161167 )
0 commit comments