Skip to content

Commit

Permalink
Fix bug in QuantumGraph generation involving adjustQuantum.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Oct 30, 2023
1 parent 6a81885 commit 151cc8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/changes/DM-41486.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug in `QuantumGraph` generation triggered by an `adjustQuantum` that modifies input edges when prerequisite input edges are present on that quantum.
5 changes: 4 additions & 1 deletion python/lsst/pipe/base/quantum_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,10 @@ def _find_removed(
for dataset_type, kept_refs in adjusted.items():
parent_dataset_type_name, _ = DatasetType.splitDatasetTypeName(dataset_type.name)
for kept_ref in kept_refs:
result.remove(DatasetKey(parent_dataset_type_name, kept_ref.dataId.values_tuple()))
# We don't know if this was a DatasetKey or a
# PrerequisiteDatasetKey; just try both.
result.discard(DatasetKey(parent_dataset_type_name, kept_ref.dataId.values_tuple()))
result.discard(PrerequisiteDatasetKey(parent_dataset_type_name, kept_ref.id.bytes))

Check warning on line 1106 in python/lsst/pipe/base/quantum_graph_builder.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/quantum_graph_builder.py#L1105-L1106

Added lines #L1105 - L1106 were not covered by tests
return result


Expand Down

0 comments on commit 151cc8a

Please sign in to comment.