4456 optional import issue on top-level modules -- monai.handlers/monai.engines#5132
4456 optional import issue on top-level modules -- monai.handlers/monai.engines#5132wyli merged 7 commits intoProject-MONAI:devfrom
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 |
ericspod
left a comment
There was a problem hiding this comment.
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 htmlcommand in thedocs/folder.