Skip to content
Snippets Groups Projects

Refactor stacking for reuse and overlappability

Merged David Hammer requested to merge refactor-stacking into master
Files
2
@@ -207,23 +207,14 @@ class ShmemTrainMatcher(TrainMatcher.TrainMatcher):
).astype(np.bool, copy=False),
# prepare stacking
(
stacking_data_shapes,
ignore_stacking,
fill_missed_data,
) = self._stacking_friend.check_stacking_data(sources, frame_selection_mask)
self._stacking_friend.maybe_update_stacking_buffers(
stacking_data_shapes, fill_missed_data, new_sources_map
self._stacking_friend.prepare_stacking_for_train(
sources, frame_selection_mask, new_sources_map
)
for (new_source, key), msg in ignore_stacking.items():
self.log.WARN(f"Failed to stack {new_source}.{key}: {msg}")
if self._thread_pool is None:
for source, (data, timestamp) in sources.items():
self._handle_source(
source, data, timestamp, new_sources_map, frame_selection_mask,
ignore_stacking
)
else:
concurrent.futures.wait(
@@ -235,7 +226,6 @@ class ShmemTrainMatcher(TrainMatcher.TrainMatcher):
timestamp,
new_sources_map,
frame_selection_mask,
ignore_stacking,
)
for source, (data, timestamp) in sources.items()
]
Loading