cucim icon indicating copy to clipboard operation
cucim copied to clipboard

[BUG] some thresholding functions require scikit-image>=0.19

Open grlee77 opened this issue 2 years ago • 3 comments

Describe the bug

Changes made in #276 break use of some thresholding functions if the user does not have scikit-image >= 0.19. We should either bump our minimum requirement to 0.19 or provide a fallback.

Steps/Code to reproduce bug many test failures are seen for cucim/skimage/filters/tests/test_thresholding.py

Expected behavior all tests should pass

Environment details (please complete the following information): cuCIM branch 22.08

grlee77 avatar Aug 01 '22 18:08 grlee77

It looks like we didn't bump this dependency. Should we be doing this? Also is this only test related or would users see this in workflows?

https://github.com/rapidsai/cucim/blob/e155e320ab4bbe1e37f7d35dbd3870ccd8beed64/conda/recipes/cucim/meta.yaml#L35

jakirkham avatar Aug 15 '22 18:08 jakirkham

The functions failing with 0.18 are;

  • threshold_multiotsu (hist kwarg isn't present in 0.18.x)
  • threshold_minimum (max_iter was deprecated in 0.19 and we use the new max_num_iter which wasn't present in 0.18)
  • try_all_threshold (fails due to the same threshold_minimum failure)

All will work if the user upgrades to >=0.19.

grlee77 avatar Aug 15 '22 22:08 grlee77

This commit where we deferred some computations to scikit-image and removed duplicate code is what lead to the issue.

grlee77 avatar Aug 15 '22 22:08 grlee77