lsst-ctrl-bps-parsl 30.0.0rc2__py3-none-any.whl → 30.0.1rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. lsst/ctrl/bps/parsl/configuration.py +11 -11
  2. lsst/ctrl/bps/parsl/job.py +33 -22
  3. lsst/ctrl/bps/parsl/site.py +10 -12
  4. lsst/ctrl/bps/parsl/sites/__init__.py +1 -0
  5. lsst/ctrl/bps/parsl/sites/ccin2p3.py +20 -17
  6. lsst/ctrl/bps/parsl/sites/local.py +16 -1
  7. lsst/ctrl/bps/parsl/sites/princeton.py +1 -1
  8. lsst/ctrl/bps/parsl/sites/slac.py +1 -1
  9. lsst/ctrl/bps/parsl/sites/slurm.py +25 -8
  10. lsst/ctrl/bps/parsl/sites/torque.py +59 -16
  11. lsst/ctrl/bps/parsl/sites/work_queue.py +14 -14
  12. lsst/ctrl/bps/parsl/version.py +1 -1
  13. lsst/ctrl/bps/parsl/workflow.py +11 -10
  14. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/METADATA +3 -3
  15. lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/RECORD +26 -0
  16. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/WHEEL +1 -1
  17. lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/RECORD +0 -26
  18. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/licenses/COPYRIGHT +0 -0
  19. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/licenses/LICENSE +0 -0
  20. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/licenses/bsd_license.txt +0 -0
  21. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/licenses/gpl-v3.0.txt +0 -0
  22. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/top_level.txt +0 -0
  23. {lsst_ctrl_bps_parsl-30.0.0rc2.dist-info → lsst_ctrl_bps_parsl-30.0.1rc1.dist-info}/zip-safe +0 -0
@@ -89,32 +89,32 @@ def get_bps_config_value(
89
89
 
90
90
  Parameters
91
91
  ----------
92
- config : `BpsConfig`
92
+ config : `lsst.ctrl.bps.BpsConfig`
93
93
  Configuration from which to retrieve value.
94
94
  key : `str`
95
95
  Key name.
96
96
  dataType : `type`
97
97
  We require that the returned value have this type.
98
- default : optional
98
+ default : `typing.Any`, optional
99
99
  Default value to be provided if ``key`` doesn't exist in the
100
100
  ``config``. A default value of `None` means that there is no default.
101
101
  required : `bool`, optional
102
- If ``True``, the returned value may come from the configuration or from
102
+ If `True`, the returned value may come from the configuration or from
103
103
  the default, but it may not be `None`.
104
104
 
105
105
  Returns
106
106
  -------
107
- value
108
- Value for ``key`` in the `config`` if it exists, otherwise ``default``,
109
- if provided.
107
+ `type` or `None`
108
+ Value for ``key`` in the ``config`` if it exists, otherwise
109
+ ``default``, if provided.
110
110
 
111
111
  Raises
112
112
  ------
113
113
  KeyError
114
- If ``key`` is not in ``config`` and no default is provided but a value
115
- is ``required``.
114
+ Raised if ``key`` is not in ``config`` and no default is provided but
115
+ a value is ``required``.
116
116
  RuntimeError
117
- If the value is not set or is of the wrong type.
117
+ Raised if the value is not set or is of the wrong type.
118
118
  """
119
119
  options: dict[str, Any] = {"expandEnvVars": True, "replaceVars": True, "required": required}
120
120
  if default is not None:
@@ -138,7 +138,7 @@ def get_workflow_name(config: BpsConfig) -> str:
138
138
 
139
139
  Parameters
140
140
  ----------
141
- config : `BpsConfig`
141
+ config : `lsst.ctrl.bps.BpsConfig`
142
142
  BPS configuration.
143
143
 
144
144
  Returns
@@ -177,7 +177,7 @@ def set_parsl_logging(config: BpsConfig) -> int:
177
177
 
178
178
  Parameters
179
179
  ----------
180
- config : `BpsConfig`
180
+ config : `lsst.ctrl.bps.BpsConfig`
181
181
  BPS configuration.
182
182
 
183
183
  Returns
@@ -35,7 +35,7 @@ from textwrap import dedent
35
35
  from typing import Any
36
36
 
37
37
  from parsl.app.bash import BashApp
38
- from parsl.app.futures import Future
38
+ from parsl.dataflow.futures import AppFuture
39
39
 
40
40
  from lsst.ctrl.bps import BpsConfig, GenericWorkflow, GenericWorkflowJob
41
41
 
@@ -49,7 +49,7 @@ _file_regex = re.compile(r"<FILE:(\S+)>") # Regex for replacing <FILE:WHATEVER>
49
49
 
50
50
  def run_command(
51
51
  command_line: str,
52
- inputs: Sequence[Future] = (),
52
+ inputs: Sequence[AppFuture] = (),
53
53
  stdout: str | None = None,
54
54
  stderr: str | None = None,
55
55
  parsl_resource_specification: dict[str, Any] | None = None,
@@ -58,13 +58,14 @@ def run_command(
58
58
 
59
59
  This function exists to get information into parsl, through the ``inputs``,
60
60
  ``stdout`` and ``stderr`` parameters. It needs to be wrapped by a parsl
61
- ``bash_app`` decorator before use, after which it will return a `Future`.
61
+ ``bash_app`` decorator before use, after which it will return a
62
+ `parsl.dataflow.futures.AppFuture`.
62
63
 
63
64
  Parameters
64
65
  ----------
65
66
  command_line : `str`
66
67
  Command-line to have parsl run.
67
- inputs : list of `Future`
68
+ inputs : `list` [`parsl.dataflow.futures.AppFuture`]
68
69
  Other commands that must have run before this.
69
70
  stdout, stderr : `str`, optional
70
71
  Filenames for stdout and stderr.
@@ -84,7 +85,7 @@ def get_file_paths(workflow: GenericWorkflow, name: str) -> dict[str, str]:
84
85
 
85
86
  Parameters
86
87
  ----------
87
- workflow : `GenericWorkflow`
88
+ workflow : `lsst.ctrl.bps.GenericWorkflow`
88
89
  BPS workflow that knows the file paths.
89
90
  name : `str`
90
91
  Job name.
@@ -102,9 +103,9 @@ class ParslJob:
102
103
 
103
104
  Parameters
104
105
  ----------
105
- generic : `GenericWorkflowJob`
106
+ generic : `lsst.ctrl.bps.GenericWorkflowJob`
106
107
  BPS job information.
107
- config : `BpsConfig`
108
+ config : `lsst.ctrl.bps.BpsConfig`
108
109
  BPS configuration.
109
110
  file_paths : `dict` mapping `str` to `str`
110
111
  File paths for job, indexed by symbolic name.
@@ -237,20 +238,27 @@ class ParslJob:
237
238
  ("request_cpus", "cores", None),
238
239
  ("request_disk", "disk", None), # Both are MB
239
240
  ("request_walltime", "running_time_min", None), # Both are minutes
241
+ ("priority", "priority", None),
240
242
  ):
241
243
  value = getattr(self.generic, bps_name)
242
- if scale is not None:
244
+ if value is not None and scale is not None:
243
245
  value *= scale
244
- resources[parsl_name] = value
246
+ # Parsl's `HighThroughputExecutor` cannot have
247
+ # `priority=None`, but it can be omitted. By contrast,
248
+ # `WorkQueueExecutor` needs to have the other resource
249
+ # requests provided, but `priority` can be omitted, so we
250
+ # need special handling for `priority`.
251
+ if (parsl_name == "priority" and value is not None) or parsl_name != "priority":
252
+ resources[parsl_name] = value
245
253
  return resources
246
254
 
247
255
  def get_future(
248
256
  self,
249
257
  app: BashApp,
250
- inputs: list[Future],
258
+ inputs: list[AppFuture],
251
259
  command_prefix: str | None = None,
252
- add_resources: bool = False,
253
- ) -> Future | None:
260
+ resource_list: list | None = None,
261
+ ) -> AppFuture | None:
254
262
  """Get the parsl app future for the job.
255
263
 
256
264
  This effectively queues the job for execution by a worker, subject to
@@ -258,23 +266,22 @@ class ParslJob:
258
266
 
259
267
  Parameters
260
268
  ----------
261
- app : callable
269
+ app : `parsl.app.bash.BashApp`
262
270
  A parsl bash_app decorator to use.
263
- inputs : list of `Future`
271
+ inputs : `list` [ `parsl.dataflow.futures.AppFuture` ]
264
272
  Dependencies to be satisfied before executing this job.
265
273
  command_prefix : `str`, optional
266
274
  Bash commands to execute before the job command, e.g., for setting
267
275
  the environment.
268
- add_resources : `bool`
269
- Add resource specification when submitting the job? This is only
270
- appropriate for the ``WorkQueue`` executor; other executors will
271
- raise an exception.
276
+ resource_list : `list`, optional
277
+ List of resource specifications to pass to the Parsl executor.
272
278
 
273
279
  Returns
274
280
  -------
275
- future : `Future` or `None`
276
- A `Future` object linked to the execution of the job, or `None` if
277
- the job has already been done (e.g., by ``run_local``).
281
+ future : `parsl.dataflow.futures.AppFuture` or `None`
282
+ A `parsl.dataflow.futures.AppFuture` object linked to the execution
283
+ of the job, or `None` if the job has already been done (e.g., by
284
+ ``run_local``).
278
285
  """
279
286
  if self.done:
280
287
  return None # Nothing to do
@@ -283,7 +290,11 @@ class ParslJob:
283
290
  command = self.evaluate_command_line(command)
284
291
  if command_prefix:
285
292
  command = command_prefix + "\n" + command
286
- resources = self.get_resources() if add_resources else {}
293
+ resources = (
294
+ {k: v for k, v in self.get_resources().items() if k in resource_list}
295
+ if resource_list is not None
296
+ else {}
297
+ )
287
298
 
288
299
  # Add a layer of indirection to which we can add a useful name.
289
300
  # This name is used by parsl for tracking workflow status.
@@ -54,18 +54,16 @@ class SiteConfig(ABC):
54
54
 
55
55
  Parameters
56
56
  ----------
57
- config : `BpsConfig`
57
+ config : `lsst.ctrl.bps.BpsConfig`
58
58
  BPS configuration.
59
- add_resources : `bool`
60
- Add resource specification when submitting the job? This is only
61
- appropriate for the ``WorkQueue`` executor; other executors will
62
- raise an exception.
59
+ resource_list : `list`, optional
60
+ List of parsl resource specifications to pass to the executor.
63
61
  """
64
62
 
65
- def __init__(self, config: BpsConfig, add_resources: bool = False):
63
+ def __init__(self, config: BpsConfig, resource_list: list = None):
66
64
  self.config = config
67
65
  self.site = self.get_site_subconfig(config)
68
- self.add_resources = add_resources
66
+ self.resource_list = resource_list
69
67
 
70
68
  @staticmethod
71
69
  def get_site_subconfig(config: BpsConfig) -> BpsConfig:
@@ -76,12 +74,12 @@ class SiteConfig(ABC):
76
74
 
77
75
  Parameters
78
76
  ----------
79
- config : `BpsConfig`
77
+ config : `lsst.ctrl.bps.BpsConfig`
80
78
  BPS configuration.
81
79
 
82
80
  Returns
83
81
  -------
84
- site : `BpsConfig`
82
+ site : `lsst.ctrl.bps.BpsConfig`
85
83
  Site sub-configuration.
86
84
  """
87
85
  computeSite = get_bps_config_value(config, "computeSite", str, required=True)
@@ -99,7 +97,7 @@ class SiteConfig(ABC):
99
97
 
100
98
  Parameters
101
99
  ----------
102
- config : `BpsConfig`
100
+ config : `lsst.ctrl.bps.BpsConfig`
103
101
  BPS configuration.
104
102
 
105
103
  Returns
@@ -128,7 +126,7 @@ class SiteConfig(ABC):
128
126
 
129
127
  Parameters
130
128
  ----------
131
- job : `ParslJob`
129
+ job : `lsst.ctrl.bps.parsl.ParslJob`
132
130
  Job to be executed.
133
131
 
134
132
  Returns
@@ -187,7 +185,7 @@ class SiteConfig(ABC):
187
185
 
188
186
  Returns
189
187
  -------
190
- monitor : `MonitoringHub` or `None`
188
+ monitor : `parsl.monitoring.MonitoringHub` or `None`
191
189
  Parsl monitor, or `None` for no monitor.
192
190
  """
193
191
  if not get_bps_config_value(self.site, "monitorEnable", bool, False):
@@ -29,3 +29,4 @@ from .local import *
29
29
  from .slurm import *
30
30
  from .torque import *
31
31
  from .work_queue import *
32
+ from .ccin2p3 import *
@@ -11,7 +11,7 @@ from ..configuration import get_bps_config_value
11
11
  from ..site import SiteConfig
12
12
 
13
13
  if TYPE_CHECKING:
14
- from .job import ParslJob
14
+ from ..job import ParslJob
15
15
 
16
16
  __all__ = ("Ccin2p3",)
17
17
 
@@ -46,7 +46,7 @@ class Ccin2p3(SiteConfig):
46
46
  If you do need to modify those defaults, you can overwrite them for
47
47
  all job slots or for specific each job slots. Requirements specified
48
48
  for a job slot take priority over those specified for all job slots
49
- at the level of entry '.site.ccin2p3:'.
49
+ at the level of entry ``.site.ccin2p3:``.
50
50
 
51
51
  This is an example of how to overwrite selected requirements in your BPS
52
52
  submission file:
@@ -79,40 +79,41 @@ class Ccin2p3(SiteConfig):
79
79
  - "--licenses=my_product"
80
80
  - "--reservation=my_reservation"
81
81
 
82
- At the level of entry 'site.ccin2p3:' in the BPS submission file, the
82
+ At the level of entry ``site.ccin2p3:`` in the BPS submission file, the
83
83
  following configuration parameters are accepted, which apply to all slot
84
84
  sizes:
85
85
 
86
- - `partition` (`str`): name of the one or more configured partitions. If
86
+ - ``partition`` (`str`): name of the one or more configured partitions. If
87
87
  more than one, separate them with comma (',').
88
88
  (Default: "lsst,htc")
89
- - `walltime` (`str`): walltime to require for the job (Default: "72:00:00")
90
- - `scheduler_options` (`list` [`str`] ): scheduler options to send to Slurm
91
- for scheduling purposes.
89
+ - ``walltime`` (`str`): walltime to require for the job
90
+ (Default: "72:00:00")
91
+ - ``scheduler_options`` (`list` [`str`] ): scheduler options to send to
92
+ Slurm for scheduling purposes.
92
93
  (Default: "--licenses=sps")
93
94
 
94
95
  In addition, as shown in the previous example, for each job slot (i.e.
95
96
  "small", "medium", etc.) you can specify the requirements above as well as
96
97
  the following:
97
98
 
98
- - `max_blocks` (`int`): maximum number of Slurm jobs that your workflow can
99
- simultaneously use.
100
- - `memory` (`int`): required amount of memory for each job, in Gigabytes.
101
- (Defaults: 4 for "small", 10 for "medium", 50 fo "large" and
99
+ - ``max_blocks`` (`int`): maximum number of Slurm jobs that your workflow
100
+ can simultaneously use.
101
+ - ``memory`` (`int`): required amount of memory for each job, in Gigabytes.
102
+ (Defaults: 4 for "small", 10 for "medium", 50 for "large" and
102
103
  150 for "xlarge").
103
104
 
104
105
  Parameters
105
106
  ----------
106
- *args : optional
107
+ *args
107
108
  Arguments to initialize the super-class.
108
- **kwargs : optional
109
+ **kwargs
109
110
  Keyword arguments to initialize the super-class.
110
111
 
111
112
  Returns
112
113
  -------
113
- Ccin2p3 : `SiteConfig`
114
- Concrete instance of a `SiteConfig` specific for the CC-IN2P3 Slurm
115
- farm.
114
+ Ccin2p3 : `lsst.ctrl.bps.parsl.SiteConfig`
115
+ Concrete instance of a `~lsst.ctrl.bps.parsl.SiteConfig` specific for
116
+ the CC-IN2P3 Slurm farm.
116
117
  """
117
118
 
118
119
  DEFAULT_ACCOUNT: str = "lsst"
@@ -122,6 +123,8 @@ class Ccin2p3(SiteConfig):
122
123
  ]
123
124
 
124
125
  def __init__(self, *args, **kwargs):
126
+ # Have BPS-defined resource requests for each job passed to executor.
127
+ kwargs["resource_list"] = ["priority"]
125
128
  super().__init__(*args, **kwargs)
126
129
  self._account = get_bps_config_value(self.site, ".account", str, self.DEFAULT_ACCOUNT)
127
130
  self._scheduler_options = get_bps_config_value(
@@ -314,7 +317,7 @@ class Ccin2p3(SiteConfig):
314
317
 
315
318
  Parameters
316
319
  ----------
317
- job : `ParslJob`
320
+ job : `lsst.ctrl.bps.parsl.ParslJob`
318
321
  Job to be executed.
319
322
 
320
323
  Returns
@@ -43,10 +43,25 @@ __all__ = ("Local",)
43
43
  class Local(SiteConfig):
44
44
  """Configuration for running jobs on the local machine.
45
45
 
46
+ Parameters
47
+ ----------
48
+ *args : `~typing.Any`
49
+ Parameters forwarded to base class constructor.
50
+ **kwargs : `~typing.Any`
51
+ Keyword arguments passed to base class constructor, augmented by
52
+ the ``resource_list`` argument.
53
+
54
+ Notes
55
+ -----
46
56
  The number of cores to use is specified in the site configuration, under
47
57
  ``site.<computeSite>.cores`` (`int`).
48
58
  """
49
59
 
60
+ def __init__(self, *args, **kwargs):
61
+ # Have BPS-defined resource requests for each job passed to executor.
62
+ kwargs["resource_list"] = ["priority"]
63
+ super().__init__(*args, **kwargs)
64
+
50
65
  def get_executors(self) -> list[ParslExecutor]:
51
66
  """Get a list of executors to be used in processing.
52
67
 
@@ -60,7 +75,7 @@ class Local(SiteConfig):
60
75
 
61
76
  Parameters
62
77
  ----------
63
- job : `ParslJob`
78
+ job : `lsst.ctrl.bps.parsl.ParslJob`
64
79
  Job to be executed.
65
80
 
66
81
  Returns
@@ -104,7 +104,7 @@ class Tiger(Slurm):
104
104
 
105
105
  Parameters
106
106
  ----------
107
- job : `ParslJob`
107
+ job : `lsst.ctrl.bps.parsl.ParslJob`
108
108
  Job to be executed.
109
109
 
110
110
  Returns
@@ -92,7 +92,7 @@ class Sdf(Slurm):
92
92
 
93
93
  Parameters
94
94
  ----------
95
- job : `ParslJob`
95
+ job : `lsst.ctrl.bps.parsl.ParslJob`
96
96
  Job to be executed.
97
97
 
98
98
  Returns
@@ -46,6 +46,16 @@ Kwargs = dict[str, Any]
46
46
  class Slurm(SiteConfig):
47
47
  """Configuration for generic Slurm cluster.
48
48
 
49
+ Parameters
50
+ ----------
51
+ *args : `~typing.Any`
52
+ Parameters forwarded to base class constructor.
53
+ **kwargs : `~typing.Any`
54
+ Keyword arguments passed to base class constructor, augmented by
55
+ the ``resource_list`` argument.
56
+
57
+ Notes
58
+ -----
49
59
  This can be used directly as the site configuration for a Slurm cluster by
50
60
  setting the BPS config, e.g.:
51
61
 
@@ -80,6 +90,11 @@ class Slurm(SiteConfig):
80
90
  script (each line usually starting with ``#SBATCH``).
81
91
  """
82
92
 
93
+ def __init__(self, *args, **kwargs):
94
+ # Have BPS-defined resource requests for each job passed to executor.
95
+ kwargs["resource_list"] = ["priority"]
96
+ super().__init__(*args, **kwargs)
97
+
83
98
  def make_executor(
84
99
  self,
85
100
  label: str,
@@ -121,13 +136,15 @@ class Slurm(SiteConfig):
121
136
  scheduler_options : `str`, optional
122
137
  ``#SBATCH`` directives to prepend to the Slurm submission script.
123
138
  provider_options : `dict`, optional
124
- Additional arguments for `SlurmProvider` constructor.
139
+ Additional arguments for `parsl.providers.SlurmProvider`
140
+ constructor.
125
141
  executor_options : `dict`, optional
126
- Additional arguments for `HighThroughputExecutor` constructor.
142
+ Additional arguments for `parsl.executors.HighThroughputExecutor`
143
+ constructor.
127
144
 
128
145
  Returns
129
146
  -------
130
- executor : `HighThroughputExecutor`
147
+ executor : `parsl.executors.HighThroughputExecutor`
131
148
  Executor for Slurm jobs.
132
149
  """
133
150
  nodes = get_bps_config_value(self.site, "nodes", int, nodes, required=True)
@@ -186,7 +203,7 @@ class Slurm(SiteConfig):
186
203
 
187
204
  Parameters
188
205
  ----------
189
- job : `ParslJob`
206
+ job : `lsst.ctrl.bps.parsl.ParslJob`
190
207
  Job to be executed.
191
208
 
192
209
  Returns
@@ -260,11 +277,11 @@ class TripleSlurm(Slurm):
260
277
 
261
278
  Parameters
262
279
  ----------
263
- small_options : kwargs
280
+ small_options : `dict` [`str`, `typing.Any`]
264
281
  Options for ``make_executor`` for small executor.
265
- medium_options : kwargs
282
+ medium_options : `dict` [`str`, `typing.Any`]
266
283
  Options for ``make_executor`` for medium executor.
267
- large_options : kwargs
284
+ large_options : `dict` [`str`, `typing.Any`]
268
285
  Options for ``make_executor`` for large executor.
269
286
  **common_options
270
287
  Common options for ``make_executor`` for each of the executors.
@@ -297,7 +314,7 @@ class TripleSlurm(Slurm):
297
314
 
298
315
  Parameters
299
316
  ----------
300
- job : `ParslJob`
317
+ job : `lsst.ctrl.bps.parsl.ParslJob`
301
318
  Job to be executed.
302
319
 
303
320
  Returns
@@ -47,6 +47,16 @@ Kwargs = dict[str, Any]
47
47
  class Torque(SiteConfig):
48
48
  """Configuration for generic Torque cluster.
49
49
 
50
+ Parameters
51
+ ----------
52
+ *args : `~typing.Any`
53
+ Parameters forwarded to base class constructor.
54
+ **kwargs : `~typing.Any`
55
+ Keyword arguments passed to base class constructor, augmented by
56
+ the ``resource_list`` argument.
57
+
58
+ Notes
59
+ -----
50
60
  This can be used directly as the site configuration for a Torque cluster by
51
61
  setting the BPS config, e.g.:
52
62
 
@@ -75,6 +85,11 @@ class Torque(SiteConfig):
75
85
  script (each line usually starting with ``#PBS``).
76
86
  """
77
87
 
88
+ def __init__(self, *args, **kwargs):
89
+ # Have BPS-defined resource requests for each job passed to executor.
90
+ kwargs["resource_list"] = ["priority"]
91
+ super().__init__(*args, **kwargs)
92
+
78
93
  def make_executor(
79
94
  self,
80
95
  label: str,
@@ -105,18 +120,20 @@ class Torque(SiteConfig):
105
120
  Default time limit for each Torque job.
106
121
  mem_per_worker : `float`, optional
107
122
  Minimum memory per worker (GB), limited by the executor.
108
- worker_init : `str`, optional
109
- Environment initiation command
110
123
  scheduler_options : `str`, optional
111
124
  ``#SBATCH`` directives to prepend to the Torque submission script.
125
+ worker_init : `str`, optional
126
+ Environment initiation command.
112
127
  provider_options : `dict`, optional
113
- Additional arguments for `TorqueProvider` constructor.
128
+ Additional arguments for `parsl.providers.TorqueProvider`
129
+ constructor.
114
130
  executor_options : `dict`, optional
115
- Additional arguments for `HighThroughputExecutor` constructor.
131
+ Additional arguments for `parsl.executors.HighThroughputExecutor`
132
+ constructor.
116
133
 
117
134
  Returns
118
135
  -------
119
- executor : `HighThroughputExecutor`
136
+ executor : `parsl.executors.HighThroughputExecutor`
120
137
  Executor for Torque jobs.
121
138
  """
122
139
  nodes = get_bps_config_value(self.site, "nodes", int, nodes, required=True)
@@ -174,7 +191,7 @@ class Torque(SiteConfig):
174
191
 
175
192
  Parameters
176
193
  ----------
177
- job : `ParslJob`
194
+ job : `lsst.ctrl.bps.parsl.ParslJob`
178
195
  Job to be executed.
179
196
 
180
197
  Returns
@@ -186,8 +203,20 @@ class Torque(SiteConfig):
186
203
 
187
204
 
188
205
  class PbsTorqueProvider(TorqueProvider):
189
- """Torque Execution Provider
190
-
206
+ """Torque Execution Provider.
207
+
208
+ Parameters
209
+ ----------
210
+ *args : `~typing.Any`
211
+ Parameters forwarded to base class constructor.
212
+ tasks_per_node : `int`, optional
213
+ Number of tasks per node.
214
+ **kwargs : `~typing.Any`
215
+ Keyword arguments passed to base class constructor, augmented by
216
+ the ``resource_list`` argument.
217
+
218
+ Notes
219
+ -----
191
220
  This provider uses qsub to submit, qstat for status, and qdel to cancel
192
221
  jobs. The qsub script to be used is created from a template file in this
193
222
  same module.
@@ -203,12 +232,6 @@ class PbsTorqueProvider(TorqueProvider):
203
232
  def submit(self, command, tasks_per_node, job_name="parsl.torque"):
204
233
  """Submit the command onto an Local Resource Manager job.
205
234
 
206
- This function returns an ID that corresponds to the task that was just
207
- submitted.
208
-
209
- The ``tasks_per_node`` parameter is ignored in this provider, as it is
210
- set at construction time.
211
-
212
235
  Parameters
213
236
  ----------
214
237
  command : `str`
@@ -221,9 +244,17 @@ class PbsTorqueProvider(TorqueProvider):
221
244
 
222
245
  Returns
223
246
  -------
224
- None: At capacity, cannot provision more
225
- job_id (string): Identifier for the job
247
+ response : `str` or `None`
248
+ If `None`: At capacity, cannot provision more.
249
+ If job_id (`str`): Identifier for the job.
250
+
251
+ Notes
252
+ -----
253
+ This function returns an ID that corresponds to the task that was just
254
+ submitted.
226
255
 
256
+ The ``tasks_per_node`` parameter is ignored in this provider, as it is
257
+ set at construction time.
227
258
  """
228
259
  return super().submit(
229
260
  command=command,
@@ -236,10 +267,22 @@ class PbsMpiRunLauncher(MpiRunLauncher):
236
267
  """Worker launcher that wraps the user's command with the framework to
237
268
  launch multiple command invocations via ``mpirun``.
238
269
 
270
+ Parameters
271
+ ----------
272
+ debug : `bool`, optional
273
+ Enable or disable debug logging.
274
+ bash_location : `str`, optional
275
+ Path to the ``bash`` shell binary.
276
+ overrides : `str`, optional
277
+ Any override options.
278
+
279
+ Notes
280
+ -----
239
281
  This wrapper sets the bash env variable ``CORES`` to the number of cores on
240
282
  the machine.
241
283
 
242
284
  This launcher makes the following assumptions:
285
+
243
286
  - mpirun is installed and can be located in ``$PATH``
244
287
  - The provider makes available the ``$PBS_NODEFILE`` environment variable
245
288
  """
@@ -47,11 +47,11 @@ __all__ = ("LocalSrunWorkQueue", "WorkQueue")
47
47
 
48
48
 
49
49
  class WorkQueue(SiteConfig):
50
- """Base class configuraton for `WorkQueueExecutor`.
50
+ """Base class configuraton for `parsl.executors.WorkQueueExecutor`.
51
51
 
52
52
  Subclasses must provide implementations for ``.get_executors``
53
53
  and ``.select_executor``. In ``.get_executors``, the site-specific
54
- `ExecutionProvider` must be defined.
54
+ `~parsl.providers.base.ExecutionProvider` must be defined.
55
55
 
56
56
  Parameters
57
57
  ----------
@@ -59,7 +59,7 @@ class WorkQueue(SiteConfig):
59
59
  Parameters forwarded to base class constructor.
60
60
  **kwargs : `~typing.Any`
61
61
  Keyword arguments passed to base class constructor, augmented by
62
- the ``add_resources`` argument.
62
+ the ``resource_list`` argument.
63
63
 
64
64
  Notes
65
65
  -----
@@ -79,7 +79,7 @@ class WorkQueue(SiteConfig):
79
79
 
80
80
  def __init__(self, *args, **kwargs):
81
81
  # Have BPS-defined resource requests for each job passed to work_queue.
82
- kwargs["add_resources"] = True
82
+ kwargs["resource_list"] = ["memory", "cores", "disk", "running_time_min", "priority"]
83
83
  super().__init__(*args, **kwargs)
84
84
 
85
85
  def make_executor(
@@ -91,20 +91,20 @@ class WorkQueue(SiteConfig):
91
91
  worker_options: str = "",
92
92
  wq_max_retries: int = 1,
93
93
  ) -> ParslExecutor:
94
- """Return a `WorkQueueExecutor`. The ``provider`` contains the
95
- site-specific configuration.
94
+ """Return a `parsl.executors.WorkQueueExecutor`. The ``provider``
95
+ contains the site-specific configuration.
96
96
 
97
97
  Parameters
98
98
  ----------
99
99
  label : `str`
100
100
  Label for executor.
101
- provider : `ExecutionProvider`
102
- Parsl execution provider, e.g., `SlurmProvider`.
101
+ provider : `parsl.providers.base.ExecutionProvider`
102
+ Parsl execution provider, e.g., `parsl.providers.SlurmProvider`.
103
103
  port : `int`, optional
104
104
  Port used by work_queue. Default: ``9000``.
105
105
  worker_options : `str`, optional
106
106
  Extra options to pass to work_queue workers, e.g.,
107
- ``"--memory=90000"``. Default: `""`.
107
+ ``"--memory=90000"``. Default: ``""``.
108
108
  wq_max_retries : `int`, optional
109
109
  Number of retries for work_queue to attempt per job. Set to
110
110
  ``None`` to have it try indefinitely; set to ``1`` to have Parsl
@@ -125,13 +125,13 @@ class WorkQueue(SiteConfig):
125
125
 
126
126
 
127
127
  class LocalSrunWorkQueue(WorkQueue):
128
- """Configuration for a `WorkQueueExecutor` that uses a `LocalProvider`
129
- to manage resources.
128
+ """Configuration for a `parsl.executors.WorkQueueExecutor` that uses a
129
+ `parsl.providers.LocalProvider` to manage resources.
130
130
 
131
131
  This can be used directly as the site configuration within a
132
132
  multi-node allocation when Slurm is available. For running on a
133
- single node, e.g., a laptop, a `SingleNodeLauncher` is used, and
134
- Slurm need not be available.
133
+ single node, e.g., a laptop, a `parsl.launchers.SingleNodeLauncher` is
134
+ used, and Slurm need not be available.
135
135
 
136
136
  The following BPS configuration parameters are recognized, overriding the
137
137
  defaults:
@@ -170,7 +170,7 @@ class LocalSrunWorkQueue(WorkQueue):
170
170
 
171
171
  Parameters
172
172
  ----------
173
- job : `ParslJob`
173
+ job : `lsst.ctrl.bps.parsl.ParslJob`
174
174
  Job to be executed.
175
175
 
176
176
  Returns
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "30.0.0rc2"
2
+ __version__ = "30.0.1rc1"
@@ -60,7 +60,7 @@ def get_parsl_config(config: BpsConfig) -> parsl.config.Config:
60
60
 
61
61
  Parameters
62
62
  ----------
63
- config : `BpsConfig`
63
+ config : `lsst.ctrl.bps.BpsConfig`
64
64
  BPS configuration.
65
65
 
66
66
  Returns
@@ -83,7 +83,7 @@ class ParslWorkflow(BaseWmsWorkflow):
83
83
  Generic workflow config.
84
84
  path : `str`
85
85
  Path prefix for workflow output files.
86
- jobs : `dict` mapping `str` to `ParslJob`
86
+ jobs : `dict` mapping `str` to `lsst.ctrl.bps.parsl.ParslJob`
87
87
  Jobs to be executed.
88
88
  parents : `dict` mapping `str` to iterable of `str`
89
89
  Dependency tree. Keywords are job names, and values are a list of job
@@ -92,7 +92,7 @@ class ParslWorkflow(BaseWmsWorkflow):
92
92
  endpoints : iterable of `str`
93
93
  Endpoints of the dependency tree. These jobs (specified by name) have
94
94
  no children.
95
- final : `ParslJob`, optional
95
+ final : `lsst.ctrl.bps.parsl.ParslJob`, optional
96
96
  Final job to be done, e.g., to merge the execution butler. This is done
97
97
  locally.
98
98
  """
@@ -149,7 +149,7 @@ class ParslWorkflow(BaseWmsWorkflow):
149
149
 
150
150
  Parameters
151
151
  ----------
152
- config : `BpsConfig`
152
+ config : `lsst.ctrl.bps.BpsConfig`
153
153
  Configuration of the workflow.
154
154
  generic_workflow : `lsst.ctrl.bps.generic_workflow.GenericWorkflow`
155
155
  Generic representation of a single workflow.
@@ -233,8 +233,9 @@ class ParslWorkflow(BaseWmsWorkflow):
233
233
 
234
234
  Returns
235
235
  -------
236
- futures : `list` of `Future`
237
- `Future` objects linked to the execution of the endpoint jobs.
236
+ futures : `list` of `parsl.dataflow.futures.AppFuture`
237
+ `parsl.dataflow.futures.AppFuture` objects linked to the execution
238
+ of the endpoint jobs.
238
239
  """
239
240
  futures = [self.execute(name) for name in self.endpoints]
240
241
  if block:
@@ -260,9 +261,9 @@ class ParslWorkflow(BaseWmsWorkflow):
260
261
 
261
262
  Returns
262
263
  -------
263
- future : `Future` or `None`
264
- A `Future` object linked to the execution of the job, or `None` if
265
- the job is being reserved to run locally.
264
+ future : `parsl.dataflow.futures.AppFuture` or `None`
265
+ A `parsl.dataflow.futures.AppFuture` object linked to the execution
266
+ of the job, or `None` if the job is being reserved to run locally.
266
267
  """
267
268
  if name in ("pipetaskInit", "mergeExecutionButler"):
268
269
  # These get done outside of parsl
@@ -278,7 +279,7 @@ class ParslWorkflow(BaseWmsWorkflow):
278
279
  self.apps[label],
279
280
  [ff for ff in inputs if ff is not None],
280
281
  self.command_prefix,
281
- self.site.add_resources,
282
+ self.site.resource_list,
282
283
  )
283
284
 
284
285
  def load_dfk(self):
@@ -1,20 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-ctrl-bps-parsl
3
- Version: 30.0.0rc2
3
+ Version: 30.0.1rc1
4
4
  Summary: Parsl-based plugin for lsst-ctrl-bps.
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License-Expression: BSD-3-Clause OR GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/lsst/ctrl_bps_parsl
8
+ Project-URL: Source, https://github.com/lsst/ctrl_bps_parsl
8
9
  Keywords: lsst
9
10
  Classifier: Intended Audience :: Science/Research
10
11
  Classifier: Operating System :: OS Independent
11
12
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
16
  Classifier: Topic :: Scientific/Engineering :: Astronomy
17
- Requires-Python: >=3.11.0
17
+ Requires-Python: >=3.12.0
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: COPYRIGHT
20
20
  License-File: LICENSE
@@ -0,0 +1,26 @@
1
+ lsst/ctrl/bps/parsl/__init__.py,sha256=gU6EMvA--BVorVVMw_4i9-F_kran4V-25WzAeLJRsqE,1466
2
+ lsst/ctrl/bps/parsl/configuration.py,sha256=y5wfo9oiV9617x2iI_KByAJJ6NPSZ3M08kz69NxNz1c,5811
3
+ lsst/ctrl/bps/parsl/environment.py,sha256=xg2_WM-H77KOdn0M_Wi2sE7h7aqTSV1uxSiFHJmnu5w,2250
4
+ lsst/ctrl/bps/parsl/job.py,sha256=3mRDTg6XMoN71VmNzhna-1MSd75ifHQkF3jhljeLhrY,12462
5
+ lsst/ctrl/bps/parsl/service.py,sha256=mKM6C4mVTr3n0PsZWf5w0zc_o6qBiroQA1YfEgmde5s,3951
6
+ lsst/ctrl/bps/parsl/site.py,sha256=vgMGqAexb23ahdFb0D6vMtOvyjGArZTD-ze0cqtCeQY,8707
7
+ lsst/ctrl/bps/parsl/version.py,sha256=-auEgPcWk4qAWrWVMJY7Of7dAJ0dNQHoqQraCNdAEN4,52
8
+ lsst/ctrl/bps/parsl/workflow.py,sha256=eATSY0abV2iFePZOiOHnTY5vIuOl_5xeXfboXwETDHw,11619
9
+ lsst/ctrl/bps/parsl/sites/__init__.py,sha256=J9HpVUqqlIkve0tIEELPbicY81vz_liZKpBUrTA1D2Q,1464
10
+ lsst/ctrl/bps/parsl/sites/ccin2p3.py,sha256=7pKn9s6RCqUtNovJG3u-qwTGgxJq0whAk4k6eGUTJVg,14784
11
+ lsst/ctrl/bps/parsl/sites/local.py,sha256=tN-mawQkMLbxeQULSWD159K9b8UFZyzu11Lb9An0Bqg,3126
12
+ lsst/ctrl/bps/parsl/sites/nersc.py,sha256=obUiaHgHZj_23PIrYdihUnb8eoEJMs288wHy84jIzaQ,4549
13
+ lsst/ctrl/bps/parsl/sites/princeton.py,sha256=U12w0GZBXj-ZmkG5qnFawmQ8dH-A2kw2lWZ7DYPodXc,5595
14
+ lsst/ctrl/bps/parsl/sites/slac.py,sha256=SrzNjG1c_xtPDwZBSW0P9hIpvkBktGAggVj4fdzWSIM,3913
15
+ lsst/ctrl/bps/parsl/sites/slurm.py,sha256=qyx2pbYtmBsyEnSwNPyw8zpZdUAwJ-jB3aYMoc4mHRE,13484
16
+ lsst/ctrl/bps/parsl/sites/torque.py,sha256=qx8vxko1PR1I1GJNbNblIrARSl5b8JuXfr6IIPpsG-o,10879
17
+ lsst/ctrl/bps/parsl/sites/work_queue.py,sha256=MPFSd6mfUdxWodQBZE8GQ9ivwTbtHkUvdiVrmyeRq6k,7256
18
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/licenses/COPYRIGHT,sha256=M5ylfMNsihIJcPySQ5ZFjec4zROSZdlNN9oGHBhu7WM,181
19
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/licenses/LICENSE,sha256=pRExkS03v0MQW-neNfIcaSL6aiAnoLxYgtZoFzQ6zkM,232
20
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/licenses/bsd_license.txt,sha256=7MIcv8QRX9guUtqPSBDMPz2SnZ5swI-xZMqm_VDSfxY,1606
21
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/licenses/gpl-v3.0.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
22
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/METADATA,sha256=5KlNmeWU3IWRPLAZreL5OH5BDMTbWJenuNgLdchPuYY,2960
23
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
24
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
25
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
+ lsst_ctrl_bps_parsl-30.0.1rc1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,26 +0,0 @@
1
- lsst/ctrl/bps/parsl/__init__.py,sha256=gU6EMvA--BVorVVMw_4i9-F_kran4V-25WzAeLJRsqE,1466
2
- lsst/ctrl/bps/parsl/configuration.py,sha256=Dq9hZW0fnmNHZoD_eAH3u2Dk0sNCZQ9NuSnFjTzFEi4,5731
3
- lsst/ctrl/bps/parsl/environment.py,sha256=xg2_WM-H77KOdn0M_Wi2sE7h7aqTSV1uxSiFHJmnu5w,2250
4
- lsst/ctrl/bps/parsl/job.py,sha256=O95H0_f-S92xgjNQeDBCzDtQkiXKLK8uzFcx6cm-AVA,11728
5
- lsst/ctrl/bps/parsl/service.py,sha256=mKM6C4mVTr3n0PsZWf5w0zc_o6qBiroQA1YfEgmde5s,3951
6
- lsst/ctrl/bps/parsl/site.py,sha256=L_wAF7qwMkcIChD0KTrIokZOD8E47ck-Qixf8L95sPk,8708
7
- lsst/ctrl/bps/parsl/version.py,sha256=CrAQNQjb1NNXqaNvScI53U2GvkmrnpRtyOiy0bIrcl4,52
8
- lsst/ctrl/bps/parsl/workflow.py,sha256=s6ayWoZ1CX2_mdFJvksiwUNChy9pfloxZ6JU87bfuLA,11435
9
- lsst/ctrl/bps/parsl/sites/__init__.py,sha256=w_IOW3_lBguS5k3U9R925wCENgUhu3407FSw7ExrKus,1441
10
- lsst/ctrl/bps/parsl/sites/ccin2p3.py,sha256=UD86cgS9ffJaz__zs4PQmHQqE7B4jhMWAerViCAt7Gk,14597
11
- lsst/ctrl/bps/parsl/sites/local.py,sha256=El8U6XfeYBbfHyg-7R3a1gtWX1IBLq_xZvKXyjiAQIk,2622
12
- lsst/ctrl/bps/parsl/sites/nersc.py,sha256=obUiaHgHZj_23PIrYdihUnb8eoEJMs288wHy84jIzaQ,4549
13
- lsst/ctrl/bps/parsl/sites/princeton.py,sha256=F_dHTN5sm2NM2VjtJoWbtKfhkowBocIs5F7eSgjxc-0,5575
14
- lsst/ctrl/bps/parsl/sites/slac.py,sha256=IN04Nx0YvOl-GN33MB05zT0XG3IQ91rXri_EHz_dzTs,3893
15
- lsst/ctrl/bps/parsl/sites/slurm.py,sha256=6aA4cJSS1nSUydKZ1o-4xKDydgOoictWBl9mJPhB3vY,12822
16
- lsst/ctrl/bps/parsl/sites/torque.py,sha256=gP8X-u3oH6P79kw2Fj_Mx3NqpVSQmqSHMT1tgxiU7Yc,9621
17
- lsst/ctrl/bps/parsl/sites/work_queue.py,sha256=QpeGjd7o0FpnXRrbrxTNSXcfkTHclBKv6vMPPRRgfd8,7040
18
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/licenses/COPYRIGHT,sha256=M5ylfMNsihIJcPySQ5ZFjec4zROSZdlNN9oGHBhu7WM,181
19
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/licenses/LICENSE,sha256=pRExkS03v0MQW-neNfIcaSL6aiAnoLxYgtZoFzQ6zkM,232
20
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/licenses/bsd_license.txt,sha256=7MIcv8QRX9guUtqPSBDMPz2SnZ5swI-xZMqm_VDSfxY,1606
21
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/licenses/gpl-v3.0.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
22
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/METADATA,sha256=JFQVegSzXO950hXyKBPDX0zou-0HUfn0F6OS4ZRlQWI,2951
23
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
24
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
25
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
- lsst_ctrl_bps_parsl-30.0.0rc2.dist-info/RECORD,,