@@ -35,6 +35,7 @@ def slurm_run(
35
35
max_simultaneous_jobs : int = 100 ,
36
36
exclusive : bool = True ,
37
37
executor_type : EXECUTOR_TYPES = "process-pool" ,
38
+ extra_scheduler : list [str ] | tuple [list [str ], ...] | None = None ,
38
39
extra_run_manager_kwargs : dict [str , Any ] | None = None ,
39
40
extra_scheduler_kwargs : dict [str , Any ] | None = None ,
40
41
initializers : list [Callable [[], None ]] | None = None ,
@@ -93,17 +94,22 @@ def slurm_run(
93
94
"loky", or "process-pool".
94
95
exclusive
95
96
Whether to use exclusive nodes, adds ``"--exclusive"`` if True.
97
+ extra_scheduler
98
+ Extra ``#SLURM`` (depending on scheduler type)
99
+ arguments, e.g. ``["--exclusive=user", "--time=1"]`` or a tuple of lists,
100
+ e.g. ``(["--time=10"], ["--time=20"]])`` for two jobs.
96
101
extra_run_manager_kwargs
97
102
Extra keyword arguments to pass to the `RunManager`.
98
103
extra_scheduler_kwargs
99
- Extra keyword arguments to pass to the `SLURMScheduler `.
104
+ Extra keyword arguments to pass to the `adaptive_scheduler.scheduler.SLURM `.
100
105
initializers
101
106
List of functions that are called before the job starts, can populate
102
107
a cache.
103
108
104
109
Returns
105
110
-------
106
111
RunManager
112
+
107
113
"""
108
114
if partition is None :
109
115
partitions = slurm_partitions ()
@@ -143,6 +149,7 @@ def slurm_run(
143
149
executor_type = executor_type ,
144
150
num_threads = num_threads ,
145
151
exclusive = exclusive ,
152
+ extra_scheduler = extra_scheduler ,
146
153
** (extra_scheduler_kwargs or {}),
147
154
)
148
155
scheduler = SLURM (** slurm_kwargs )
0 commit comments