Skip to content

Commit

Permalink
fix: DIA-1982: update agreement when converting preds to annots (#7163)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakelley authored Mar 5, 2025
1 parent 096cfd6 commit 4108f9e
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def predictions_to_annotations(project, queryset, **kwargs):
)
# Update counters for tasks and is_labeled. It should be a single operation as counters affect bulk is_labeled update
project.update_tasks_counters_and_is_labeled(Task.objects.filter(id__in=tasks_ids))

try:
from stats.functions.stats import recalculate_stats_async_or_sync

recalculate_stats_async_or_sync(project, all=False)
except (ModuleNotFoundError, ImportError):
logger.info('Predictions converted to annotations in LSO, stats recomputation skipped')

return {'response_code': 200, 'detail': f'Created {count} annotations'}


Expand Down

0 comments on commit 4108f9e

Please sign in to comment.