-
Notifications
You must be signed in to change notification settings - Fork 203
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
Quick fix for simplecrf imports #606
Quick fix for simplecrf imports #606
Conversation
Signed-off-by: masadcv <[email protected]>
@SachidanandAlle I made all SImpleCRF imports optional. Please give it a try by uninstalling SimpleCRF and running any app. On my end this exp runs fine. |
monailabel/scribbles/transforms.py
Outdated
@@ -31,6 +30,10 @@ | |||
maxflow3d, | |||
) | |||
|
|||
densecrf, _ = optional_import("dennseCRF") | |||
densecrf3d, _ = optional_import("denseCRF3D") |
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.
here, you could use:
densecrf3d, _ = optional_import("denseCRF3D") | |
densecrf3d, has_densecrf3d = optional_import("denseCRF3D") |
and then you could use has_densecrf3d
elsewhere to display an error if the user tries to use scribbles.
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! will update this.
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.
Looks good!
Signed-off-by: masadcv <[email protected]>
This solves one part of the problem... when SimpleCRF is installed but import fails due to xyz reasons... |
* quick fix for simplecrf imports Signed-off-by: masadcv <[email protected]> * use has_import to give a nice ImportError Signed-off-by: masadcv <[email protected]> Co-authored-by: SACHIDANAND ALLE <[email protected]>
Signed-off-by: masadcv [email protected]
Work around for #605 until the error is debugged.