lsst-ctrl-mpexec 29.2025.3400__py3-none-any.whl → 29.2025.3600__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/mpexec/__init__.py +0 -1
  2. lsst/ctrl/mpexec/cli/butler_factory.py +253 -95
  3. lsst/ctrl/mpexec/cli/cmd/commands.py +2 -2
  4. lsst/ctrl/mpexec/cli/opt/optionGroups.py +0 -1
  5. lsst/ctrl/mpexec/cli/opt/options.py +0 -7
  6. lsst/ctrl/mpexec/cli/script/pre_exec_init_qbb.py +25 -12
  7. lsst/ctrl/mpexec/cli/script/qgraph.py +177 -89
  8. lsst/ctrl/mpexec/cli/script/run.py +211 -99
  9. lsst/ctrl/mpexec/cli/script/run_qbb.py +166 -31
  10. lsst/ctrl/mpexec/cli/utils.py +49 -0
  11. lsst/ctrl/mpexec/showInfo.py +17 -15
  12. lsst/ctrl/mpexec/version.py +1 -1
  13. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/METADATA +1 -1
  14. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/RECORD +22 -23
  15. lsst/ctrl/mpexec/cmdLineFwk.py +0 -534
  16. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/WHEEL +0 -0
  17. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/entry_points.txt +0 -0
  18. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/licenses/COPYRIGHT +0 -0
  19. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/licenses/LICENSE +0 -0
  20. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/licenses/bsd_license.txt +0 -0
  21. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/licenses/gpl-v3.0.txt +0 -0
  22. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/top_level.txt +0 -0
  23. {lsst_ctrl_mpexec-29.2025.3400.dist-info → lsst_ctrl_mpexec-29.2025.3600.dist-info}/zip-safe +0 -0
@@ -28,11 +28,16 @@
28
28
 
29
29
  import collections
30
30
  import contextlib
31
+ import logging
31
32
  import re
32
33
 
34
+ from astropy.table import Table
35
+
33
36
  from lsst.daf.butler.cli.opt import config_file_option, config_option
34
37
  from lsst.daf.butler.cli.utils import MWCommand, split_commas
38
+ from lsst.pipe.base import QuantumGraph
35
39
  from lsst.pipe.base.cli.opt import instrument_option
40
+ from lsst.utils.logging import getLogger
36
41
 
37
42
  from .opt import delete_option, task_option
38
43
 
@@ -43,6 +48,10 @@ from .opt import delete_option, task_option
43
48
  # value: argument value excluding task label.
44
49
  _PipelineAction = collections.namedtuple("_PipelineAction", "action,label,value")
45
50
 
51
+ _LOG = getLogger(__name__)
52
+
53
+ MP_TIMEOUT = 3600 * 24 * 30 # Default timeout (sec) for multiprocessing
54
+
46
55
 
47
56
  class _PipelineActionType:
48
57
  """Class defining a callable type which converts strings into
@@ -155,3 +164,43 @@ class PipetaskCommand(MWCommand):
155
164
  """Command subclass with pipetask-command specific overrides."""
156
165
 
157
166
  extra_epilog = "See 'pipetask --help' for more options."
167
+
168
+
169
+ def summarize_quantum_graph(qgraph: QuantumGraph) -> int:
170
+ """Report a summary of the quanta in the graph.
171
+
172
+ Parameters
173
+ ----------
174
+ qgraph : `lsst.pipe.base.QuantumGraph`
175
+ The graph to be summarized.
176
+
177
+ Returns
178
+ -------
179
+ n_quanta : `int`
180
+ The number of quanta in the graph.
181
+ """
182
+ n_quanta = len(qgraph)
183
+ if n_quanta == 0:
184
+ _LOG.info("QuantumGraph contains no quanta.")
185
+ else:
186
+ summary = qgraph.getSummary()
187
+ if _LOG.isEnabledFor(logging.INFO):
188
+ qg_quanta, qg_tasks = [], []
189
+ for task_label, task_info in summary.qgraphTaskSummaries.items():
190
+ qg_tasks.append(task_label)
191
+ qg_quanta.append(task_info.numQuanta)
192
+ qg_task_table = Table(dict(Quanta=qg_quanta, Tasks=qg_tasks))
193
+ qg_task_table_formatted = "\n".join(qg_task_table.pformat())
194
+ quanta_str = "quantum" if n_quanta == 1 else "quanta"
195
+ n_tasks = len(qgraph.taskGraph)
196
+ n_tasks_plural = "" if n_tasks == 1 else "s"
197
+ _LOG.info(
198
+ "QuantumGraph contains %d %s for %d task%s, graph ID: %r\n%s",
199
+ n_quanta,
200
+ quanta_str,
201
+ n_tasks,
202
+ n_tasks_plural,
203
+ qgraph.graphID,
204
+ qg_task_table_formatted,
205
+ )
206
+ return n_quanta
@@ -34,19 +34,18 @@ import re
34
34
  import sys
35
35
  from collections import defaultdict
36
36
  from collections.abc import Mapping
37
- from types import SimpleNamespace
38
37
  from typing import Any
39
38
 
40
39
  import lsst.pex.config as pexConfig
41
40
  import lsst.pex.config.history as pexConfigHistory
42
- from lsst.daf.butler import DatasetRef, DatasetType, NamedKeyMapping
41
+ from lsst.daf.butler import Butler, DatasetRef, DatasetType, NamedKeyMapping
43
42
  from lsst.daf.butler.datastore.record_data import DatastoreRecordData
44
43
  from lsst.pipe.base import PipelineGraph, QuantumGraph
45
44
  from lsst.pipe.base.pipeline_graph import visualization
45
+ from lsst.resources import ResourcePathExpression
46
46
 
47
47
  from . import util
48
48
  from ._pipeline_graph_factory import PipelineGraphFactory
49
- from .cli.butler_factory import ButlerFactory
50
49
 
51
50
 
52
51
  class _FilteredStream:
@@ -179,16 +178,19 @@ class ShowInfo:
179
178
  raise RuntimeError(f"Unexpectedly tried to process command {command!r}.")
180
179
  self.handled.add(command)
181
180
 
182
- def show_graph_info(self, graph: QuantumGraph, args: SimpleNamespace | None = None) -> None:
181
+ def show_graph_info(
182
+ self,
183
+ graph: QuantumGraph,
184
+ butler_config: ResourcePathExpression | None = None,
185
+ ) -> None:
183
186
  """Show information associated with this graph.
184
187
 
185
188
  Parameters
186
189
  ----------
187
190
  graph : `lsst.pipe.base.QuantumGraph`
188
191
  Graph to use when reporting information.
189
- args : `types.SimpleNamespace`, optional
190
- Parsed command-line parameters. Used to obtain additional external
191
- information such as the location of a usable Butler.
192
+ butler_config : convertible to `lsst.resources.ResourcePath`, optional
193
+ Path to configuration for the butler.
192
194
  """
193
195
  for command in self.graph_commands:
194
196
  if command not in self.commands:
@@ -197,9 +199,9 @@ class ShowInfo:
197
199
  case "graph":
198
200
  self._showGraph(graph)
199
201
  case "uri":
200
- if args is None:
201
- raise ValueError("The uri option requires additional command line arguments.")
202
- self._showUri(graph, args)
202
+ if butler_config is None:
203
+ raise ValueError("Showing URIs requires the -b option")
204
+ self._showUri(graph, butler_config)
203
205
  case "workflow":
204
206
  self._showWorkflow(graph)
205
207
  case _:
@@ -365,15 +367,15 @@ class ShowInfo:
365
367
  for parent in graph.determineInputsToQuantumNode(node):
366
368
  print(f"Parent Quantum {parent.nodeId} - Child Quantum {node.nodeId}", file=self.stream)
367
369
 
368
- def _showUri(self, graph: QuantumGraph, args: SimpleNamespace) -> None:
369
- """Print input and predicted output URIs to stdout
370
+ def _showUri(self, graph: QuantumGraph, butler_config: ResourcePathExpression) -> None:
371
+ """Print input and predicted output URIs to stdout.
370
372
 
371
373
  Parameters
372
374
  ----------
373
375
  graph : `lsst.pipe.base.QuantumGraph`
374
376
  Execution graph
375
- args : `types.SimpleNamespace`
376
- Parsed command line
377
+ butler_config : convertible to `lsst.resources.ResourcePath`
378
+ Path to configuration for the butler.
377
379
  """
378
380
 
379
381
  def dumpURIs(thisRef: DatasetRef) -> None:
@@ -385,7 +387,7 @@ class ShowInfo:
385
387
  for compName, compUri in components.items():
386
388
  print(f" {compName}: {compUri}", file=self.stream)
387
389
 
388
- butler = ButlerFactory.make_read_butler(args)
390
+ butler = Butler.from_config(butler_config)
389
391
  for node in graph:
390
392
  print(f"Quantum {node.nodeId}: {node.taskDef.taskName}", file=self.stream)
391
393
  print(" inputs:", file=self.stream)
@@ -1,2 +1,2 @@
1
1
  __all__ = ["__version__"]
2
- __version__ = "29.2025.3400"
2
+ __version__ = "29.2025.3600"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-ctrl-mpexec
3
- Version: 29.2025.3400
3
+ Version: 29.2025.3600
4
4
  Summary: Pipeline execution infrastructure for the Rubin Observatory LSST Science Pipelines.
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: BSD 3-Clause License
@@ -1,8 +1,7 @@
1
1
  lsst/__init__.py,sha256=aXdEOZVrBQISQi6XPS9s1NhBjIJaIwNNxCFRiGchRAw,1369
2
2
  lsst/ctrl/__init__.py,sha256=aXdEOZVrBQISQi6XPS9s1NhBjIJaIwNNxCFRiGchRAw,1369
3
- lsst/ctrl/mpexec/__init__.py,sha256=XOMrfYiBPZoiaxWTlzN-seJu258x42U1GdR_ti9jLMk,1733
3
+ lsst/ctrl/mpexec/__init__.py,sha256=Ld4bk-SLij104yAdrAzvh54ZblCglYszOa6cLjWnIDE,1707
4
4
  lsst/ctrl/mpexec/_pipeline_graph_factory.py,sha256=suzWUn9YGn0CTA_3N1Wd-sUo7TFxuo_6VZ2nO0CJ5a8,3552
5
- lsst/ctrl/mpexec/cmdLineFwk.py,sha256=CZrFRFvEHyN1RFp0ToJH3AEeofaeCDQh4-dH-eAmnM4,21603
6
5
  lsst/ctrl/mpexec/execFixupDataId.py,sha256=26eFIrZ-I5oTGoBzO35WH2UtwYIPe5aX37IHE9OfAa0,1633
7
6
  lsst/ctrl/mpexec/executionGraphFixup.py,sha256=hpkU0cCRcz80c-YQS1eU5G4riRTSUfOfPjCehTkWTMA,1776
8
7
  lsst/ctrl/mpexec/log_capture.py,sha256=Y8ExKqrpyboBoi6giY9dlL4OyCrZn-c_6EB8Oh_z6dc,1605
@@ -12,40 +11,40 @@ lsst/ctrl/mpexec/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
11
  lsst/ctrl/mpexec/quantumGraphExecutor.py,sha256=7LCoqsmNSWUJ1ph1bfgrVrpk5Ug5ArzniFkqcxgjfhI,2106
13
12
  lsst/ctrl/mpexec/reports.py,sha256=EvHjW9wdjfN1lj4DQH634oJ9zv3wYKySvJ_UtFDtNHY,2460
14
13
  lsst/ctrl/mpexec/separablePipelineExecutor.py,sha256=yHymF9jSthVCl_230TzRqQrcAmohSgR7Me8YAbMazM8,1818
15
- lsst/ctrl/mpexec/showInfo.py,sha256=8kDUG0t8jla_sNl2gh6bdhp7EFZCFUkOPGbEziYfx3g,16415
14
+ lsst/ctrl/mpexec/showInfo.py,sha256=F0JXAaOxOzre88xHrc810bzXOcv6dkYQY9HZyzMp6qo,16433
16
15
  lsst/ctrl/mpexec/simple_pipeline_executor.py,sha256=aVWgOds0ILCTzXdrWy0KFyjcIuqw6cNq8alAJeZd8AE,1797
17
16
  lsst/ctrl/mpexec/singleQuantumExecutor.py,sha256=Y6ufL6y5PuQ6-x8sFu_m2moCIA3JvOf6Gb9PotXeTno,8649
18
17
  lsst/ctrl/mpexec/taskFactory.py,sha256=0TdCM-le7CXhobVbWPTqcq9sOrGceUY6mmkzzWhi0dM,1707
19
18
  lsst/ctrl/mpexec/util.py,sha256=y2Rw5PL40_EuLtVxiqSVX0JfPV4IrFl1LfOMUWx2u30,4236
20
- lsst/ctrl/mpexec/version.py,sha256=I85NfXGXrIHDL-kkxKGyHltD0yfSxXDKLv7joJrC86w,55
19
+ lsst/ctrl/mpexec/version.py,sha256=ZurYJq3H1N3sYvajaIHiUwmYLCKpJ0UAtat5MF3tfkU,55
21
20
  lsst/ctrl/mpexec/cli/__init__.py,sha256=6dpDHNBzyicVpFi1fsaiYVbYEMeoL57IHKkPaej24gs,1301
22
- lsst/ctrl/mpexec/cli/butler_factory.py,sha256=06V0ZvGc1cdt7vVOIQWU6O7N8qTbhzb_K6SMQ4D13Cg,20032
21
+ lsst/ctrl/mpexec/cli/butler_factory.py,sha256=-Nlm5nVcWK_JbW8oc5qudu9yuZg5Pknf1LmtkxTkHJs,26713
23
22
  lsst/ctrl/mpexec/cli/pipetask.py,sha256=4HnhX9dCizCihVbpHVJX5WXO9TEli9oL6wA-tPh1_vA,2209
24
- lsst/ctrl/mpexec/cli/utils.py,sha256=5iOrlj5jJTWtZS0BMLsuiCGAvxbfrjd1MSyXxBthWcc,6503
23
+ lsst/ctrl/mpexec/cli/utils.py,sha256=Yld_IHGY_z-Sn7KkuFbhQcrhWsZci_AHB7jDFkeoJSY,8099
25
24
  lsst/ctrl/mpexec/cli/cmd/__init__.py,sha256=nRmwwW5d55gAEkyE7NpSK8mxa56HcfEta2r-Y9I07F8,1661
26
- lsst/ctrl/mpexec/cli/cmd/commands.py,sha256=TU9--_pfYW-P9qbX-hx8p2HnhDmDK3HO8Suv8YAz6cU,18234
25
+ lsst/ctrl/mpexec/cli/cmd/commands.py,sha256=5vmik8pzd61rAAZs0FjbQxzmZEHkRC0_M21yh4Mw6sw,18245
27
26
  lsst/ctrl/mpexec/cli/opt/__init__.py,sha256=IzUInuJj9igiaNcEqMx0adelgJtQC5_XMYnaiizBn0A,1378
28
27
  lsst/ctrl/mpexec/cli/opt/arguments.py,sha256=vjUw0ZN_4HStp-_3ne6AT5S_eH7sly3OVfL07tgrJnY,1572
29
- lsst/ctrl/mpexec/cli/opt/optionGroups.py,sha256=4pbhbUYppAiHSLmoGb7KvDq18YiO_mhx5IhM-5w5VUo,7501
30
- lsst/ctrl/mpexec/cli/opt/options.py,sha256=7VKlAplAeyssZ3Lxc2PSzX29zry35USOaUcyXXwD-p4,19592
28
+ lsst/ctrl/mpexec/cli/opt/optionGroups.py,sha256=v_fbB-frVUdXr82VY_mC8KHdUJSJNaU64qBJO4cA3To,7445
29
+ lsst/ctrl/mpexec/cli/opt/options.py,sha256=hZyPKOYC4NXwEGGx3suGixNMZiehTaoA-2LRh_o14wg,19411
31
30
  lsst/ctrl/mpexec/cli/script/__init__.py,sha256=eCuF4FAI5D3pl05IMJj7TCkZq-hireua2mA5Ui-mKSI,1624
32
31
  lsst/ctrl/mpexec/cli/script/build.py,sha256=3_ohOGuope_hCrvBAo1X31nejgTZ73PZv_ew3ykhYIc,6919
33
32
  lsst/ctrl/mpexec/cli/script/cleanup.py,sha256=D7W-azf4mNJcIWhbU5uCRCi94mkb8-Q2ksRFblQGrUw,4990
34
33
  lsst/ctrl/mpexec/cli/script/confirmable.py,sha256=Bo1GSTZQn44d_TRj6N3YfpYcZiuHEYoz26WZQwMyb4A,3918
35
- lsst/ctrl/mpexec/cli/script/pre_exec_init_qbb.py,sha256=uaJKPoETTzlCveYX1ux8vdRieIsUSGQDvOh8HQ8HZuY,2506
34
+ lsst/ctrl/mpexec/cli/script/pre_exec_init_qbb.py,sha256=ubH3Blw5y0YISDLCI0SCaSqEfumnt30_J0jvtpdoN8U,3344
36
35
  lsst/ctrl/mpexec/cli/script/purge.py,sha256=gYwSsZfTBP6oDcDp_YdqQEKGvAStvsj5hwNw42S8ptE,10637
37
- lsst/ctrl/mpexec/cli/script/qgraph.py,sha256=-7jG6UQXol8wWuTdzkD31IivUsXoqtkKE5jNQ02j-pI,8898
36
+ lsst/ctrl/mpexec/cli/script/qgraph.py,sha256=yqTSynAP3d1qiRzrdvaSBCspYQFASpXtrGUeybTUKfk,12798
38
37
  lsst/ctrl/mpexec/cli/script/report.py,sha256=ItJitmYmWIDjj7PxRtP4qXLx-z5FAU6nSfI2gx0GS5k,12800
39
- lsst/ctrl/mpexec/cli/script/run.py,sha256=fi7weGOMYae9gQ9PLbWG-_1l_vSaAg-aucRn_aqp38Q,9793
40
- lsst/ctrl/mpexec/cli/script/run_qbb.py,sha256=5wFxv1kWk4VP7OrwtpCX96mMXWDi0zd1Zo21y-Iki_E,5554
38
+ lsst/ctrl/mpexec/cli/script/run.py,sha256=AxGv8NkyYYJCsFw3vqC6HkKRU7wTLuSetllKRCmFT-4,14180
39
+ lsst/ctrl/mpexec/cli/script/run_qbb.py,sha256=iWlxg-CMp2nkk5B0ZGovMd0Eg9Q-F1zbcQqfhUUYDYI,10739
41
40
  lsst/ctrl/mpexec/cli/script/update_graph_run.py,sha256=v_EdOaD6jR_vSlgm_5-pwUjoNEFMrAuYFM1xIaHVU3Q,2597
42
- lsst_ctrl_mpexec-29.2025.3400.dist-info/licenses/COPYRIGHT,sha256=pGCjnRAnyt02a6_9PLzXQikpvYmvMmK9fCdOKlRSV6k,369
43
- lsst_ctrl_mpexec-29.2025.3400.dist-info/licenses/LICENSE,sha256=pRExkS03v0MQW-neNfIcaSL6aiAnoLxYgtZoFzQ6zkM,232
44
- lsst_ctrl_mpexec-29.2025.3400.dist-info/licenses/bsd_license.txt,sha256=7MIcv8QRX9guUtqPSBDMPz2SnZ5swI-xZMqm_VDSfxY,1606
45
- lsst_ctrl_mpexec-29.2025.3400.dist-info/licenses/gpl-v3.0.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
46
- lsst_ctrl_mpexec-29.2025.3400.dist-info/METADATA,sha256=SgKRu1Iu3bBiTaOOVfq9sAQ-OZMkUmR_jtxOwCKTxao,2302
47
- lsst_ctrl_mpexec-29.2025.3400.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- lsst_ctrl_mpexec-29.2025.3400.dist-info/entry_points.txt,sha256=aYE38yqZU8qvpLUUkXzgmUxDJYYknEqPxgxYkowrL4s,64
49
- lsst_ctrl_mpexec-29.2025.3400.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
50
- lsst_ctrl_mpexec-29.2025.3400.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
51
- lsst_ctrl_mpexec-29.2025.3400.dist-info/RECORD,,
41
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/licenses/COPYRIGHT,sha256=pGCjnRAnyt02a6_9PLzXQikpvYmvMmK9fCdOKlRSV6k,369
42
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/licenses/LICENSE,sha256=pRExkS03v0MQW-neNfIcaSL6aiAnoLxYgtZoFzQ6zkM,232
43
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/licenses/bsd_license.txt,sha256=7MIcv8QRX9guUtqPSBDMPz2SnZ5swI-xZMqm_VDSfxY,1606
44
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/licenses/gpl-v3.0.txt,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
45
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/METADATA,sha256=Eo9YkwVVCTOCcXUqGZWcgTmvND2_h0AojW8nRaOgYTM,2302
46
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/entry_points.txt,sha256=aYE38yqZU8qvpLUUkXzgmUxDJYYknEqPxgxYkowrL4s,64
48
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/top_level.txt,sha256=eUWiOuVVm9wwTrnAgiJT6tp6HQHXxIhj2QSZ7NYZH80,5
49
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
50
+ lsst_ctrl_mpexec-29.2025.3600.dist-info/RECORD,,