diff --git a/controller/integration.py b/controller/integration.py index 954b2e3..03937f9 100644 --- a/controller/integration.py +++ b/controller/integration.py @@ -69,6 +69,9 @@ def fit_predict( ) task_type, df = collect_data(project_id, labeling_task_id, True) + if len(df.index) == 0: + #nothing to calculate no values are present (e.g. source run through but didn't hit anything) + return try: if task_type == enums.LabelingTaskType.CLASSIFICATION.value: results = integrate_classification(df, quality_metrics_overwrite) diff --git a/controller/stats.py b/controller/stats.py index 275444d..343f557 100644 --- a/controller/stats.py +++ b/controller/stats.py @@ -146,6 +146,9 @@ def calculate_quantity_statistics_for_labeling_task_from_source( _, df = integration.collect_data( labeling_task_item.project_id, labeling_task_item.id, False ) + if len(df.index) == 0: + #nothing to calculate if the source didn't hit anything + return if labeling_task_item.task_type == enums.LabelingTaskType.CLASSIFICATION.value: statistics = classification_quantity(df) else: diff --git a/submodules/model b/submodules/model index 5c96146..b57548f 160000 --- a/submodules/model +++ b/submodules/model @@ -1 +1 @@ -Subproject commit 5c96146323de5150450c192ba1583917bc53076d +Subproject commit b57548f9e4a9cd3ed80991389d57ca989e9fa818