Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-41486: Fix bug in QuantumGraph generation involving adjustQuantum. #383

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@
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