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
A clear and concise description of what the bug is.
Metrics error while running pathology classification on the cluster.
To Reproduce
Steps to reproduce the behavior:
Use the data 'TIL classification'
Run 'Classification, model VGG16'
See error (it would be helpful to include the error message and stack trace)
ERROR: Traceback (most recent call last):
File "GaNDLF/gandlf_run", line 126, in <module>
main_run(
File "GaNDLF/GANDLF/cli/main_run.py", line 103, in main_run
TrainingManager_split(
File "GaNDLF/GANDLF/training_manager.py", line 348, in TrainingManager_split
training_loop(
File "GaNDLF/GANDLF/compute/training_loop.py", line 346, in training_loop
overall_metrics = overall_stats(
File "GaNDLF/GANDLF/metrics/__init__.py", line 120, in overall_statsreturn classification.overall_stats(predictions, ground_truth, params)
File "GaNDLF/GANDLF/metrics/classification.py", line 77, in overall_stats
output_metrics[metric_name] = get_output_from_calculator(
File "GaNDLF/GANDLF/utils/tensor.py", line 540, in get_output_from_calculator
temp_output = calculator(prediction, target)
File "dev_gandlf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_implreturnself._call_impl(*args, **kwargs)
File "dev_gandlf/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1527, in _call_implreturn forward_call(*args, **kwargs)
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/metric.py", line 298, in forwardself._forward_cache =self._forward_reduce_state_update(*args, **kwargs)
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/metric.py", line 368, in _forward_reduce_state_update
batch_val =self.compute()
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/metric.py", line 607, in wrapped_func
value = _squeeze_if_scalar(compute(*args, **kwargs))
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/classification/auroc.py", line 123, in computereturn _binary_auroc_compute(state, self.thresholds, self.max_fpr)
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/functional/classification/auroc.py", line 88, in _binary_auroc_compute
fpr, tpr, _ = _binary_roc_compute(state, thresholds, pos_label)
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/functional/classification/roc.py", line 54, in _binary_roc_compute
fps, tps, thres = _binary_clf_curve(preds=state[0], target=state[1], pos_label=pos_label)
File "dev_gandlf/lib/python3.9/site-packages/torchmetrics/functional/classification/precision_recall_curve.py", line 61, in _binary_clf_curve
target = target[desc_score_indices]
IndexError: index 7 is out of bounds for dimension 0 with size 5
Expected behavior
It supposed to work :)
Media
If applicable, add images, screenshots or other relevant media to help explain your problem.
Environment information
GaNDLF version, OS, and any other relevant information.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
sylwiamm
changed the title
[BUG] AUROC error while running classification of pathology images
AUROC error while running classification of pathology images [BUG]
Mar 12, 2024
sylwiamm
changed the title
AUROC error while running classification of pathology images [BUG]
AUROC error while running classification of pathology images
Mar 12, 2024
Describe the bug
A clear and concise description of what the bug is.
Metrics error while running pathology classification on the cluster.
To Reproduce
Steps to reproduce the behavior:
'TIL classification'
'Classification, model VGG16'
Expected behavior
It supposed to work :)
Media
If applicable, add images, screenshots or other relevant media to help explain your problem.
Environment information
GaNDLF version, OS, and any other relevant information.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: