KeyError: 'label' monai/apps/auto3dseg/data_analyzer.py
See original GitHub issueDescribe the bug
running python -m monai.apps.auto3dseg DataAnalyzer get_all_case_stats
with --label_key=None
there’s a KeyError: 'label'
with this line:
https://github.com/Project-MONAI/MONAI/blob/6e77d57938a4253353265616b54ab8be3f2d5ab3/monai/apps/auto3dseg/data_analyzer.py#L265
would be great to have test cases for label_key=None
cc @mingxin-zheng do you have time for this?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python with Pandas - KeyError: u'the label [422] is not in ...
Thanks in advance. Here I let you a complete example (simplified) to see the error. First yoy have to make a source.csv file...
Read more >KeyError Pandas – How To Fix - Data Independent
Pandas KeyError - This annoying error means that Pandas can not find your column name in your dataframe. Here's how to fix this...
Read more >How to Fix KeyError Exceptions in Python
The Python KeyError is an exception that occurs when an attempt is made to access an item in a dictionary that does not...
Read more >How to Fix in Pandas: KeyError: "['Label'] not found in axis"
This tutorial explains how to fix the following error in pandas: KeyError: "['Label'] not found in axis", including an example.
Read more >Python KeyError Exceptions and How to Handle Them
In this tutorial, you'll learn how to handle Python KeyError exceptions. They are often caused by a bad ... Usually, the message would...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wyli Sure I can fix this.
There is a test for CPU case but not GPU case. I will add it in the
SIM_GPU_TEST_CASES
https://github.com/Project-MONAI/MONAI/blob/6e77d57938a4253353265616b54ab8be3f2d5ab3/tests/test_auto3dseg.py#L73Thanks @wyli . You are right. It seems
None
and"None"
are treated as special inputs forNoneType
in Python Fire. Other inputs such as “NoNe” , or “none” are treated asstr
.