Merged
Conversation
added 22 commits
January 13, 2026 17:39
… values from other keys
There was a problem hiding this comment.
Some files could not be reviewed due to errors:
./panoptes_aggregation/reducers/subtask_reducer_wrapper.py:93: [B007] Loop co...
./panoptes_aggregation/reducers/subtask_reducer_wrapper.py:93: [B007] Loop control variable 'frame_key' not used within the loop body. If this is intended, start the name with an underscore. ./panoptes_aggregation/reducers/subtask_reducer_wrapper.py:94: [B007] Loop control variable 'key' not used within the loop body. If this is intended, start the name with an underscore.
CKrawczyk
approved these changes
Mar 4, 2026
Collaborator
There was a problem hiding this comment.
All looks good. The last thing to do is to bump the "bug fix" version number to prepare for a release (found here https://github.com/zooniverse/aggregation-for-caesar/blob/rectangle-reducer-error-fix/panoptes_aggregation/version/__init__.py#L1 update to 5.3.1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an error encountered when reducing rectangle-classification extractions using the shape reducer where some rows contain empty subtask lists. During reduction, the presence of both empty and non-empty subtask lists caused the following error:
The issue is in the
subtask_reducer_wrapperwhich attempts to construct a homogeneous array from the subtask lists but errors when they are different shapes (in this case a mix of empty and non-empty lists). This PR adds try/except blocks to thesubtask_reducer_wrapperwhich removes any empty subtask lists.Two tests have also been added to
test_shape_reducer_rectangleto ensure the empty subtask lists are being removed correctly. One test contains data from the project which originally encountered this error and removes empty subtasks from clusters of one. The other tests a mixed cluster case containing rectangles with both empty and non-empty subtasks.