Skip to content

Commit

Permalink
Sort DatasetRefs in Quanta to make order deterministic.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Aug 24, 2023
1 parent bc6752a commit 6457335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/lsst/pipe/base/quantum_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def _gather_quantum_outputs(
edge_dataset_type = write_edge.adapt_dataset_type(dataset_type_node.dataset_type)
adapted_outputs[edge_dataset_type] = [
write_edge.adapt_dataset_ref(ref)
for ref in outputs_by_type.get(write_edge.parent_dataset_type_name, [])
for ref in sorted(outputs_by_type.get(write_edge.parent_dataset_type_name, []))
]
return adapted_outputs

Expand Down Expand Up @@ -810,7 +810,7 @@ class and components defined by the task's own connections.
if (current_dataset_type := adapted_inputs.keys().get(edge_dataset_type.name)) is None:
adapted_inputs[edge_dataset_type] = [
read_edge.adapt_dataset_ref(ref)
for ref in inputs_by_type.get(read_edge.parent_dataset_type_name, frozenset())
for ref in sorted(inputs_by_type.get(read_edge.parent_dataset_type_name, frozenset()))
]
elif current_dataset_type != edge_dataset_type:

Check warning on line 815 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#L815

Added line #L815 was not covered by tests
raise NotImplementedError(
Expand Down

0 comments on commit 6457335

Please sign in to comment.