[mob] Add logs for cluster feedback suggestions

This commit is contained in:
Neeraj Gupta 2024-03-28 16:25:09 +05:30
parent 9aafe137a1
commit 6c287775d4
3 changed files with 6 additions and 4 deletions

View file

@ -79,7 +79,7 @@ class ClusterFeedbackService {
final personClusters = await faceMlDb.getPersonClusterIDs(p.remoteID);
dev.log(
'existing clusters for ${p.attr.name} are $personClusters',
name: "ClusterFeedbackService",
name: "getSuggestionsUsingMedian",
);
// Get and update the cluster summary to get the avg (centroid) and count
@ -353,6 +353,9 @@ class ClusterFeedbackService {
Set<int> ignoredClusters,
) async {
final faceMlDb = FaceMLDataDB.instance;
_logger.info(
'start getUpdateClusterAvg for ${allClusterIdsToCountMap.length} clusters',
);
final Map<int, (Uint8List, int)> clusterToSummary =
await faceMlDb.clusterSummaryAll();
@ -389,6 +392,7 @@ class ClusterFeedbackService {
if (updatesForClusterSummary.isNotEmpty) {
await faceMlDb.clusterSummaryUpdate(updatesForClusterSummary);
}
_logger.info('end getUpdateClusterAvg for ${clusterAvg.length} clusters');
return clusterAvg;
}

View file

@ -206,7 +206,7 @@ class _FaceDebugSectionWidgetState extends State<FaceDebugSectionWidget> {
if (kDebugMode)
MenuItemWidget(
captionedTextWidget: const CaptionedTextWidget(
title: "Pull Embeddings From Local",
title: "Compute suggestions",
),
pressedColor: getEnteColorScheme(context).fillFaint,
trailingIcon: Icons.chevron_right_outlined,

View file

@ -37,8 +37,6 @@ class _PersonClustersState extends State<PersonReviewClusterSuggestion> {
super.initState();
// Initialize the future in initState
_fetchClusterSuggestions();
// futureClusterSuggestions = ClusterFeedbackService.instance
// .getClusterFilesForPersonID(widget.person);
}
@override