-
Notifications
You must be signed in to change notification settings - Fork 61
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
Standardize on rng
over seed
and fix miscellaneous deprecation warnings
#621
Standardize on rng
over seed
and fix miscellaneous deprecation warnings
#621
Conversation
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.
Thanks @grlee77 !
Looks good to me!
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.
Thanks Greg! 🙏
Had a couple questions below
python/cucim/src/cucim/core/operations/morphology/_distance_transform.py
Outdated
Show resolved
Hide resolved
@@ -342,7 +342,7 @@ def _reference_eigvals_computation(S_elems): | |||
def test_custom_eigvals_kernels_vs_linalg_eigvalsh(shape, dtype): | |||
rng = cp.random.default_rng(seed=5) | |||
img = rng.integers(0, 256, shape) | |||
H = hessian_matrix(img) | |||
H = hessian_matrix(img, use_gaussian_derivatives=False) |
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.
Will we need to change the hessian_matrix
's use use_gaussian_derivatives
default value at some point?
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.
Not sure. It is not marked for change yet in upstream scikit-image
.
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.
Maybe we can write up an issue to track
…ng use_gaussian_derivatives=False
…cikit-image missed this late change from seed->rng in previous scikit-image 0.21 API updates in cuCIM
use cp.unique/cp.atleast_1d directly instead of passing cupy.ndarray to numpy
857a7ba
to
45fa113
Compare
rng
over seed
and fix miscellaneous deprecation warnings
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.
Thanks Greg! 🙏
Had a few comments below
python/cucim/src/cucim/core/operations/morphology/_distance_transform.py
Show resolved
Hide resolved
@@ -342,7 +342,7 @@ def _reference_eigvals_computation(S_elems): | |||
def test_custom_eigvals_kernels_vs_linalg_eigvalsh(shape, dtype): | |||
rng = cp.random.default_rng(seed=5) | |||
img = rng.integers(0, 256, shape) | |||
H = hessian_matrix(img) | |||
H = hessian_matrix(img, use_gaussian_derivatives=False) |
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.
Maybe we can write up an issue to track
Co-authored-by: jakirkham <jakirkham@gmail.com>
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.
Thanks Greg! 🙏
/merge |
This PR fixes the following warnings observed when running the test suite: