From 088a6dffa66a043b210a833c50fe36c38a9ac0ed Mon Sep 17 00:00:00 2001 From: Jim Bosch Date: Mon, 11 Nov 2024 10:36:24 -0500 Subject: [PATCH] Don't raise when --dataset-query-constraint args are irrelevant. They might be relevant for a different subgraph, and this option needs to be usable on multi-subgraph pipelines where the subgraphs don't have overall inputs in common. --- .../pipe/base/all_dimensions_quantum_graph_builder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py b/python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py index 23c1ce1cd..3c61505c3 100644 --- a/python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py +++ b/python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py @@ -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