-
Notifications
You must be signed in to change notification settings - Fork 1.3k
4456 optional import issue on top-level modules -- monai.handlers/monai.engines #5132
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
Conversation
9c22417
to
41950d4
Compare
hi @ericspod could you please help review this PR? this is to correct the error message when top-level modules ( |
The way of loading modules needs to be reconsidered a bit here since the two stage process was from some very old code of mine. We aren't using the |
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
Signed-off-by: Wenqi Li <[email protected]>
41950d4
to
afc1faf
Compare
thanks @ericspod, it seems it's possible to achieve what you suggested. I've added an |
Signed-off-by: Wenqi Li <[email protected]>
The code from issue #4456 now works in that it gives me a module object back as expected, however it permits me to instantiate |
Signed-off-by: Wenqi Li <[email protected]>
updated to raise an error when calling MONAI/monai/handlers/ignite_metric.py Line 63 in d64c6d2
it'll also call the constructor, so I add some check for this case. @ericspod |
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.
Works for me as expected now, thanks!
Signed-off-by: Wenqi Li <[email protected]>
/build |
Signed-off-by: Wenqi Li <[email protected]>
/build |
Fixes #4456
Description
make sure that if the top-level modules miss dependencies, the optional import error raises properly.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.