Skip to content

Commit

Permalink
Merge pull request #383 from lsst/tickets/DM-41486
Browse files Browse the repository at this point in the history
DM-41486: Fix bug in QuantumGraph generation involving adjustQuantum.
  • Loading branch information
TallJimbo committed Oct 31, 2023
2 parents 6a81885 + 151cc8a commit facbe7f
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
@@ -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
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))
return result


Expand Down

0 comments on commit facbe7f

Please sign in to comment.