Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] Storge cluster summary in batches

Neeraj Gupta44a5b97de14b
diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart
index dfb6675b4b..3a906e4eb7 100644
--- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart
+++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart
@@ -387,6 +387,11 @@ class ClusterFeedbackService {
updatesForClusterSummary[clusterID] =
(avgEmbeedingBuffer, embedings.length);
}
+ // store the intermediate updates
+ if (updatesForClusterSummary.length > 100) {
+ await faceMlDb.clusterSummaryUpdate(updatesForClusterSummary);
+ updatesForClusterSummary.clear();
+ }
clusterAvg[clusterID] = avg;
}
if (updatesForClusterSummary.isNotEmpty) {