Skip to content

Commit

Permalink
Merge pull request #455 from lsst/tickets/DM-47505
Browse files Browse the repository at this point in the history
DM-47505: Don't raise when --dataset-query-constraint args are irrelevant.
  • Loading branch information
TallJimbo authored Nov 11, 2024
2 parents 591c0c7 + fa2bc96 commit 79fcafa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/changes/DM-47505.misc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
QuantumGraph generation will no longer fail when the `--dataset-query-constraint` argument includes a dataset type that is not relevant for one or more pipeline subgraphs.
8 changes: 4 additions & 4 deletions python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,10 @@ def from_builder(
constraint = set(builder.dataset_query_constraint)
inputs = result.overall_inputs - result.empty_dimensions_dataset_types.keys()
if remainder := constraint.difference(inputs):
raise QuantumGraphBuilderError(
f"{remainder} dataset type(s) specified as a graph constraint, but"
f" do not appear as an overall input to the specified pipeline: {inputs}."
" Note that component datasets are not permitted as constraints."
builder.log.debug(
"Ignoring dataset types %s in dataset query constraint that are not inputs to this "
"subgraph, on the assumption that they are relevant for a different subraph.",
remainder,
)
builder.log.debug(f"Constraining graph query using {constraint}")
result.query_args["datasets"] = constraint
Expand Down

0 comments on commit 79fcafa

Please sign in to comment.