-
Notifications
You must be signed in to change notification settings - Fork 60
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
switch from bundled lazy loading code to the public lazy_loader package #575
switch from bundled lazy loading code to the public lazy_loader package #575
Conversation
42a7c3b
to
9b3362c
Compare
rebased on top of #574 which fixes some test failures with the most recent NumPy/CuPy |
Thanks Greg! 🙏 Can you please update |
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!
…ader-and-type-stubs
Looks like there are some conflicts here that need to be resolved |
…ader-and-type-stubs
Thanks Greg! 🙏 Could you please add Lines 158 to 171 in 0a6bf42
|
The CI failure is due to the fact this change needs to be propagated Please run (in some environment where this dependency can be installed):
Then commit & push the changes |
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! 🙏
This is a nice simplification
Had a couple questions about files now included in distributions
python/cucim/setup.py
Outdated
@@ -39,6 +39,7 @@ def read(*names, **kwargs): | |||
url='https://developer.nvidia.com/multidimensional-image-processing', | |||
packages=find_packages('src'), | |||
package_dir={'cucim': 'src/cucim'}, | |||
package_data={"": ["*.pyi"]}, # distribute |
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.
Would it make sense to (somewhat?) align this with the MANIFEST.in
?
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 under what conditions it matters (e.g. python setup.py sdist seems to have the .npy files etc that are listed in the MANIFEST.in without listing them again here). I went ahead and added it for consistency, though.
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.
Yeah the rule of thumb I try to use is...
- If we want to ship them, but not install them, use
MANIFEST.in
- If we want to ship and install them, use
package_data
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.
Think the suggestion in comment ( #575 (comment) ) is revises this to the list we want to install. Though please let me know if we are still missing things
Co-authored-by: jakirkham <jakirkham@gmail.com>
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! 🙏
(asking offline for OPS to review) |
/merge |
Fixes #6956 . ### Description Looks like an error which introduced by this [PR](rapidsai/cucim#575). The submodule in cucim.skimage can import correctly, so change to directly import cucim.skimage. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). - [ ] Breaking change (fix or new feature that would cause existing functionality to change). - [ ] New tests added to cover the changes. - [ ] Integration tests passed locally by running `./runtests.sh -f -u --net --coverage`. - [ ] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. - [ ] In-line docstrings updated. - [ ] Documentation updated, tested `make html` command in the `docs/` folder. Signed-off-by: KumoLiu <yunl@nvidia.com>
This PR switch from using the internally bundled
_shared/lazy.py
to the public lazy_loader package.Also switches to use
.pyi
stub files in cases where submodules or attributes were being dynamically loaded.closes #489 (probably, but have not yet verified from VS Code)