-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
fix: metric flag while visualizing #1148
base: master
Are you sure you want to change the base?
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.
Thank you @kanishk16 for looking into this!
The metric argument parsing is working well now.
Unfortunately, I'm unable to review the visualization, as it is also not working on my setup (WSL) with the following error:
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show(block=True)
I have little time to debug this, so I would recommend someone else review the visuazlization part.
Thanks again!
No issues... IIUC the visualization is bound to fail when the backend is agg as visible here: ivadomed/ivadomed/scripts/visualize_and_compare_testing_models.py Lines 25 to 28 in f7e9d9f
|
@kanishk16 How should I test this PR? |
@lifetheater57 My bad, I should've added the section how to test the PR earlier, nevertheless I've updated it. |
Pull Request Test Coverage Report for Build 3361273310
💛 - Coveralls |
For some reason, I am getting this error on testing this PR: what I ran: I am not sure whether this is due to the PR (does seem like it though) and something do with my ivadomed version. Just a sanity check, I also ran the 2D UNet segmentation tutorial, and that started without any issues. |
Could you try adding the complete path for the model1 and model2? |
Ahh, the error observed is the original one which seems to have fixed... It primarily stems from how the Could you check if the error persists on running the file as a script? |
Sure! If you meant running it with python like ( What's surprising is that when I tried without the |
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.
Just tested it, works fine me! Just a note though, the plot is not interactive. I can just see the plots.
Idk why but the plots should be interactive... Why do I feel even those changes aren't there |
Checklist
GitHub
PR contents
Description
This PR resolves the bug while using the
--metric
flag in thevisualize_and_compare_testing_models.py
script. Furthermore, the datapoints within each violinplot are made fixed to be interactive as they earlier usesd to be. Although, the visualization works completely fine but fails in case of using a Jupyter Notebook or a Google Colab Notebook.To test this PR:
Download & extract the zip file: viz_test.zip
run
ivadomed_visualize_and_compare_testing_models
as suggested in the docs without the metadata flag.To test the
--metric
flag, select any evaluation metric fromevaluation_3Dmetrics.csv
including fromdice_class0
. Also, the features in the docs should be enabled.Linked issues
resolves #1138