Fix build

Revisit todos
This commit is contained in:
Shailesh Pandit 2022-01-15 09:39:27 +05:30
parent 4845c1d605
commit d1bab5ec84
5 changed files with 9 additions and 5 deletions

View file

@ -225,7 +225,8 @@ class BlazeFaceDetectionService implements FaceDetectionService {
);
}
// TODO: we might miss 1st pass face actually having score within threshold
// we might miss 1st pass face actually having score within threshold
// it is ok as results will be consistent with 2nd pass only detections
if (selected && selected.probability >= BLAZEFACE_SCORE_THRESHOLD) {
// console.log("pass2: ", { imageBox, paddedBox, transform, selected });
detections.push(selected);

View file

@ -150,7 +150,7 @@ export class LocalMLSyncContext implements MLSyncContext {
this.concurrency = concurrency || CONCURRENCY;
console.log('Using concurrency: ', this.concurrency);
// TODO: set timeout, timeout is added on downloads
// timeout is added on downloads
// timeout on queue will keep the operation open till worker is terminated
this.syncQueue = new PQueue({ concurrency: this.concurrency });
logQueueStats(this.syncQueue, 'sync');

View file

@ -180,6 +180,7 @@ class MachineLearningService {
}
// TODO: not required if ml data is stored as field inside ente file object
// remove, not required now
// it removes ml data for files in trash, they will be resynced if restored
// private async syncRemovedFiles(syncContext: MLSyncContext) {
// const db = await mlIDbStorage.db;
@ -220,6 +221,7 @@ class MachineLearningService {
}
// TODO: optimize, use indexdb indexes, move facecrops to cache to reduce io
// remove, already done
private async getUniqueOutOfSyncFilesNoIdx(
syncContext: MLSyncContext,
files: File[]
@ -343,7 +345,8 @@ class MachineLearningService {
}
// TODO: throw errors not related to specific file
// sync job run should stop after these errors
// don't persist these errors against file
// don't persist these errors against file,
// can include indexeddb/cache errors too
switch (error.message) {
case CustomError.SESSION_EXPIRED_MESSAGE:
case CustomError.NETWORK_ERROR:

View file

@ -1,4 +1,4 @@
// TODO: these utils only work in env where OffscreenCanvas is available
// these utils only work in env where OffscreenCanvas is available
import { BlobOptions, Dimensions } from 'types/image';
import { enlargeBox } from 'utils/machineLearning';

View file

@ -129,7 +129,7 @@ export async function migrateFaceInterfaceUpdate() {
console.log('migrateFaceInterfaceUpdate updating: ', updatedFiles.length);
await mlIDbStorage.putAllFilesInTx(updatedFiles);
await mlIDbStorage.incrementIndexVersion('faceSchema');
await mlIDbStorage.setIndexVersion('faceSchema', 1);
console.log('migrateFaceInterfaceUpdate done');
console.timeEnd('migrateFaceInterfaceUpdate');
}