-
Notifications
You must be signed in to change notification settings - Fork 52
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
bugfix: removing 2.11.0 threshold #470
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #470 +/- ##
==========================================
+ Coverage 94.08% 94.16% +0.07%
==========================================
Files 48 48
Lines 4162 4197 +35
==========================================
+ Hits 3916 3952 +36
+ Misses 246 245 -1
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad that the error has gone away but can we fix the single failing test before merging
This is captured elsewhere and is seemingly also present on main. Working on a fix for that on another branch, we'll keep this open until then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'd just double check all the errors go away when combined with the fixed main
branch
maybe merge main into here and see if tests go green? |
0013a4d
to
659634f
Compare
hm, looks like there are test failures on this one... |
yep. I am looking into this right now. It is definitely from changing to imageio >= 2.11.0 which causes an extra dimension 'S' to appear in dims. |
Diving into this error we discovered the following: Image dimensions (1, 6, 65, 233, 345) = (T, C, Z, Y, X)
When reading tiff images, data is stored as stacks of x and y pixels, and future dimensions are dictated by metadata. With imageio 2.10.5 these additional dimensions were stacked in the Time dimension. however, with newer versions this stack is split up into additional dimensions, likely indicating some new metadata reading from imageio versioning >= 2.11.0. As a result of this, we have updated tests to reflect this expected output in DefaultReader using the most recent imageio versioning. Image dimensions (6, 1, 1, 65, 233, 345) = (T, C, Z, Y, X, S) |
I will give this a larger look later but @BrianWhitneyAI those dims don't make sense to me:
that means that there are 345 dimensions of RGB....{insert more colors here}
|
I am also just dropping myself into a PR without much knowledge so if i am completely off-base just let me know haha |
I think I agree with Eva. We should get it to return |
Hey! Here's a little more (context/my thoughts) on the issue. From my understanding, the DefaultReader is a fallback for when no other reader is capable and is intended is specific to less complex, fewer dimension file types. It guesses an order of dimensions defined by _guess_dim_order function in DefaultReader. Since the change of dimensions comes from _guess_dim_order’s interpretation of a set of dimensions we wanted to maintain this interpretation within the tests to cover a wide range of files. Some possible paths to improve/resolve this are:
|
Update! we decided that a simple fix for this is something between 1 and 2. If a 4D image's last dimension is small (<=4) it is deemed 'S' whereas larger ranges inherit the Reader classes _guess_dim_order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you for taking the time to solve this!!
How did this come about?
This pull request was opened to resolve #361. At the time of this bug, several tests were failing with:
RuntimeError: `mp4` can not handle the given uri.
The quick-fix solution was to pin the dependency to "imageio[ffmpeg]>=2.9.0,<2.11.0". Returning to these tests, I was unable to replicate these errors, testing with imageio (2.10.5, 2.11.0,2.12.0, 2.26.0(current)). This is likely an indication that this issue was resolved internally by the imageio team.