Skip to content

Commit

Permalink
Fix ModelErrorAnalysis task type error (#1190)
Browse files Browse the repository at this point in the history
  • Loading branch information
matanper committed Apr 5, 2022
1 parent a93c326 commit c824e77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deepchecks/vision/checks/performance/model_error_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(self,

def initialize_run(self, context: Context):
"""Initialize property and score lists."""
context.assert_task_type(TaskType.CLASSIFICATION, TaskType.OBJECT_DETECTION)
self._train_properties = defaultdict(list)
self._test_properties = defaultdict(list)
self._train_scores = []
Expand Down Expand Up @@ -120,7 +121,7 @@ def scoring_func(predictions, labels):
def scoring_func(predictions, labels):
return per_sample_mean_iou(predictions, labels)
else:
raise DeepchecksValueError(f'Unsupported task type {dataset.task_type}')
raise DeepchecksValueError(f'Should not reach here! Unsupported task type {dataset.task_type}')

if isinstance(predictions, torch.Tensor):
predictions = predictions.cpu().detach().numpy()
Expand Down

0 comments on commit c824e77

Please sign in to comment.