Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions controller/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions controller/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion submodules/model