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-47505: Don't raise when --dataset-query-constraint args are irrelevant. #455

Merged
merged 1 commit into from
Nov 11, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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(

Check warning on line 482 in python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py

View check run for this annotation

Codecov / codecov/patch

python/lsst/pipe/base/all_dimensions_quantum_graph_builder.py#L482

Added line #L482 was not covered by tests
"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
Loading