From b4643e9741343a7057bbb43d5fcc0a26855cb424 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 23 Oct 2024 14:42:55 +0530 Subject: [PATCH] Remove testing asserts --- web/packages/new/photos/services/ml/people.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/web/packages/new/photos/services/ml/people.ts b/web/packages/new/photos/services/ml/people.ts index fb9faa65cf..cac0d49a8a 100644 --- a/web/packages/new/photos/services/ml/people.ts +++ b/web/packages/new/photos/services/ml/people.ts @@ -418,7 +418,6 @@ export const _suggestionsAndChoicesForPerson = async ( const startTime = Date.now(); const personClusters = person.cgroup.data.assigned; - const personClusterIDs = new Set(personClusters.map(({ id }) => id)); const rejectedClusterIDs = new Set( await savedRejectedClustersForCGroup(person.cgroup.id), ); @@ -461,9 +460,6 @@ export const _suggestionsAndChoicesForPerson = async ( // Ignore singleton clusters. if (faces.length < 2) continue; - // TODO-Cluster sanity check, remove after dev - if (personClusterIDs.has(id)) assertionFailed(); - const sampledOtherEmbeddings = randomSample(faces, 50) .map((id) => embeddingByFaceID.get(id)) .filter((e) => !!e); @@ -676,21 +672,11 @@ export const _applyPersonSuggestionUpdates = async ( for (const [clusterID, assigned] of updates.entries()) { switch (assigned) { case true /* assign */: - // TODO-Cluster sanity check, remove after wrapping up dev - if (assignedClusters.find(({ id }) => id == clusterID)) { - assertionFailed(); - } - assign(clusterID); unrejectIfNeeded(clusterID); break; case false /* reject */: - // TODO-Cluster sanity check, remove after wrapping up dev - if (rejectedClusterIDs.includes(clusterID)) { - assertionFailed(); - } - unassignIfNeeded(clusterID); reject(clusterID); break;