Skip to content

Commit

Permalink
Special-case component dataset types in execution reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Feb 21, 2024
1 parent a71a70a commit 2217502
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions doc/changes/DM-42954.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix component-dataset query bug in execution reports.
24 changes: 18 additions & 6 deletions python/lsst/pipe/base/execution_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,24 @@ def make_reports(
pipeline_dataset_types.intermediates,
pipeline_dataset_types.outputs,
):
refs[dataset_type.name] = {
ref.id: ref
for ref in butler.registry.queryDatasets(
dataset_type.name, collections=collection, findFirst=False
)
}
if dataset_type.component() is not None:
# Work around the fact that component support has been phased
# out of daf_butler queries but not pipe_base's QGs. This
# should go away on DM-40441.
parent_dataset_type = dataset_type.makeCompositeDatasetType()

Check warning on line 366 in python/lsst/pipe/base/execution_reports.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/execution_reports.py#L366

Added line #L366 was not covered by tests
refs[dataset_type.name] = {
ref.id: ref.makeComponentRef(dataset_type.component())
for ref in butler.registry.queryDatasets(
parent_dataset_type.name, collections=collection, findFirst=False
)
}
else:
refs[dataset_type.name] = {
ref.id: ref
for ref in butler.registry.queryDatasets(
dataset_type.name, collections=collection, findFirst=False
)
}
for task_def in qg.iterTaskGraph():
for node in qg.getNodesForTask(task_def):
status_graph.add_node(node.nodeId)
Expand Down

0 comments on commit 2217502

Please sign in to comment.