You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
using DataAnalyzer with histogram_only=True raises error:
2023-08-15 15:15:52,439 - INFO - Found 0 GPUs for data analyzing!
2023-08-15 15:15:52,441 - INFO - device=cuda:0 but CUDA device is not available, using CPU instead.
0%| | 0/10 [00:08<?, ?it/s]
Traceback (most recent call last):
File "/workspace/demo21/data/analyzer.py", line 184, in <module>
datastas = analyzer.get_all_case_stats(transform_list=label_transform)
File "/usr/local/lib/python3.10/dist-packages/monai/apps/auto3dseg/data_analyzer.py", line 228, in get_all_case_stats
result_bycase = self._get_all_case_stats(0, 1, None, key, transform_list)
File "/usr/local/lib/python3.10/dist-packages/monai/apps/auto3dseg/data_analyzer.py", line 359, in _get_all_case_stats
DataStatsKeys.BY_CASE_IMAGE_PATH: d[DataStatsKeys.BY_CASE_IMAGE_PATH],
KeyError: image_filepath
the root cause is that when skipping certain analyzers, the output stats keys won't exist
Activity
fixes Project-MONAI#6873
6873 data analyzer histogram_only=True fix (#6874)