Skip to content

minor updates/fixes for consistency with scikit-image 0.22#670

Merged
rapids-bot[bot] merged 34 commits intorapidsai:branch-24.02from
grlee77:grelee/skimage022-updates
Jan 29, 2024
Merged

minor updates/fixes for consistency with scikit-image 0.22#670
rapids-bot[bot] merged 34 commits intorapidsai:branch-24.02from
grlee77:grelee/skimage022-updates

Conversation

@grlee77
Copy link
Copy Markdown
Contributor

@grlee77 grlee77 commented Jan 6, 2024

This MR does not add any new features. It just has minor fixes ported from scikit-image 0.22. Most changed lines are from moving additional modules to use __init__.pyi files as for upstream scikit-image.

Regarding introduction of py.typed, see discussion on the scikit-image repo. The TLDR version is that it enables VS CODE (and potentially other IDEs) to use the .pyi files for intellisense capabilities. Those using mypy with strict type checking, may have to add an exclusion like the following to disable warnings about most of the cuCIM API which does not currently use type hints:

[tool.mypy]
strict = true
untyped_calls_exclude = [
    "cucim"
]

@grlee77 grlee77 added improvement Improves an existing functionality non-breaking Introduces a non-breaking change maintenance labels Jan 6, 2024
@grlee77 grlee77 added this to the v24.02.00 milestone Jan 6, 2024
@grlee77 grlee77 requested a review from a team as a code owner January 6, 2024 18:42
Copy link
Copy Markdown
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @grlee77, for this update. It's helpful to learn about the method for making the document accessible in the IDE, as shown in this pull request.
Looks good to me!

@jakirkham
Copy link
Copy Markdown
Member

It looks like the style checks are failing on CI. The single quotes need to be replaced with double quotes. There are also some long lines that need to be wrapped

Could you please run black @grlee77 ?

This is the default (and for CuPy it is the only implemented option). scikit-image uses numpy with kind='stable'
…return_error argument in phase_cross_correlation
needed in order for the .pyi files to be useful:
see: scikit-image/scikit-image#7073
@grlee77 grlee77 force-pushed the grelee/skimage022-updates branch from d04791d to 695121e Compare January 22, 2024 19:35
@grlee77 grlee77 force-pushed the grelee/skimage022-updates branch from b83c620 to 92db3c8 Compare January 23, 2024 19:46
@grlee77
Copy link
Copy Markdown
Contributor Author

grlee77 commented Jan 23, 2024

The regionprops test failure was a due to a couple missing entries in PROPS and should be fixed now.

I didn't see that jitify error related to std::is_signed when trying locally with pip packages, but conda seems to have a problem again with that now.

@grlee77 grlee77 force-pushed the grelee/skimage022-updates branch from 92db3c8 to 41a5325 Compare January 24, 2024 00:41
@jakirkham jakirkham removed the request for review from gigony January 25, 2024 19:19
Copy link
Copy Markdown
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @grlee77
The updated portion of the changes looks good to me!

Copy link
Copy Markdown
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Greg! 🙏

Had a few comments below

Co-authored-by: jakirkham <jakirkham@gmail.com>
Copy link
Copy Markdown
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Greg! 🙏

@jakirkham
Copy link
Copy Markdown
Member

As pointed out by Greg offline, we need to update this line and run rapids-dependency-file-generator

- scikit-image>=0.19.0,<0.22.0a0

Copy link
Copy Markdown
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update scikit-image upper bound

@grlee77 grlee77 requested a review from a team as a code owner January 26, 2024 20:00
@jakirkham jakirkham dismissed their stale review January 26, 2024 20:00

Resolved

@jakirkham jakirkham force-pushed the grelee/skimage022-updates branch from 1024fea to b886417 Compare January 26, 2024 20:13
@jakirkham
Copy link
Copy Markdown
Member

Do we need PyWavelets as a (test) dependency?

Seeing these errors on CI:

FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_denoise_invariant_color[float16] - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_denoise_invariant_color[float32] - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_denoise_invariant_color[float64] - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_denoise_invariant_3d - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_calibrate_denoiser_extra_output - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_calibrate_denoiser - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
FAILED python/cucim/src/cucim/skimage/restoration/tests/test_j_invariant.py::test_input_image_not_modified - ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.

@jakirkham
Copy link
Copy Markdown
Member

Looks like this is used as part of denoise_wavelet, which we are using in these tests

As pointed out by Greg offline, upstream appears to have relaxed the PyWavelets dependency in 0.22.0 with PR ( scikit-image/scikit-image#7156 ), which is why the dependency is now missing

…available

add pywavelets to test dependencies
Copy link
Copy Markdown
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Greg! 🙏

Think we might want to drop this top-level import and rewrite with something like this

Co-authored-by: jakirkham <jakirkham@gmail.com>
Copy link
Copy Markdown
Contributor

@raydouglass raydouglass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ops-codeowners changes look good

@grlee77
Copy link
Copy Markdown
Contributor Author

grlee77 commented Jan 29, 2024

/merge

@rapids-bot rapids-bot bot merged commit caade43 into rapidsai:branch-24.02 Jan 29, 2024
@jakirkham
Copy link
Copy Markdown
Member

Thanks Greg! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality maintenance non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants