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-43472: Prompt Processing version 2 not compatible with Butler dimensions-config 6 #143

Merged
merged 2 commits into from
Mar 23, 2024
Merged
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
21 changes: 12 additions & 9 deletions python/activator/middleware_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,21 +1201,24 @@ def _export_subset(self, exposure_ids: set[int],
# Transferring governor dimensions in parallel can cause deadlocks in
# central registry. We need to transfer our exposure/visit dimensions,
# so handle those manually.
for dimension in ["exposure",
for dimension in ["group",
"exposure",
"visit",
# TODO: visit_* are not needed from version 4; remove when we require v6
"visit_definition",
"visit_detector_region",
"visit_system",
"visit_system_membership",
]:
for record in self.butler.registry.queryDimensionRecords(
dimension,
where="exposure in (exposure_ids)",
bind={"exposure_ids": exposure_ids},
instrument=self.instrument.getName(),
detector=self.visit.detector,
):
self.central_butler.registry.syncDimensionData(dimension, record, update=False)
if dimension in self.butler.registry.dimensions:
for record in self.butler.registry.queryDimensionRecords(
dimension,
where="exposure in (exposure_ids)",
bind={"exposure_ids": exposure_ids},
instrument=self.instrument.getName(),
detector=self.visit.detector,
):
self.central_butler.registry.syncDimensionData(dimension, record, update=False)
transferred = self.central_butler.transfer_from(self.butler, datasets,
transfer="copy", transfer_dimensions=False)
if len(transferred) != len(datasets):
Expand Down
Loading