Face fix (#1823)
## Description - Bug fixes - Logging ## Tests Tested on my pixel phone with remote embedding fetch disabled.
This commit is contained in:
commit
65de02d8d9
2 changed files with 14 additions and 11 deletions
|
@ -97,7 +97,7 @@ class FaceMlService {
|
|||
bool _shouldSyncPeople = false;
|
||||
bool _isSyncing = false;
|
||||
|
||||
final int _fileDownloadLimit = 10;
|
||||
final int _fileDownloadLimit = 5;
|
||||
final int _embeddingFetchLimit = 200;
|
||||
|
||||
Future<void> init({bool initializeImageMlIsolate = false}) async {
|
||||
|
@ -152,8 +152,8 @@ class FaceMlService {
|
|||
_logger.info(
|
||||
"MLController allowed running ML, faces indexing starting",
|
||||
);
|
||||
unawaited(indexAndClusterAll());
|
||||
}
|
||||
unawaited(indexAndClusterAll());
|
||||
} else {
|
||||
_logger.info(
|
||||
"MLController stopped running ML, faces indexing will be paused (unless it's fetching embeddings)",
|
||||
|
@ -287,10 +287,6 @@ class FaceMlService {
|
|||
return _functionLock.synchronized(() async {
|
||||
_resetInactivityTimer();
|
||||
|
||||
if (_shouldPauseIndexingAndClustering == false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final completer = Completer<dynamic>();
|
||||
final answerPort = ReceivePort();
|
||||
|
||||
|
@ -512,12 +508,18 @@ class FaceMlService {
|
|||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!await canUseHighBandwidth()) {
|
||||
continue;
|
||||
} else {
|
||||
_logger.warning(
|
||||
'Not fetching embeddings because user manually disabled it in debug options',
|
||||
);
|
||||
}
|
||||
final smallerChunks = chunk.chunks(_fileDownloadLimit);
|
||||
for (final smallestChunk in smallerChunks) {
|
||||
if (!await canUseHighBandwidth()) {
|
||||
_logger.info(
|
||||
'stopping indexing because user is not connected to wifi',);
|
||||
break outerLoop;
|
||||
}
|
||||
for (final enteFile in smallestChunk) {
|
||||
if (_shouldPauseIndexingAndClustering) {
|
||||
_logger.info("indexAllImages() was paused, stopping");
|
||||
|
@ -543,8 +545,9 @@ class FaceMlService {
|
|||
|
||||
stopwatch.stop();
|
||||
_logger.info(
|
||||
"`indexAllImages()` finished. Fetched $fetchedCount and analyzed $fileAnalyzedCount images, in ${stopwatch.elapsed.inSeconds} seconds (avg of ${stopwatch.elapsed.inSeconds / fileAnalyzedCount} seconds per image, skipped $fileSkippedCount images. MLController status: $_mlControllerStatus)",
|
||||
"`indexAllImages()` finished. Fetched $fetchedCount and analyzed $fileAnalyzedCount images, in ${stopwatch.elapsed.inSeconds} seconds (avg of ${stopwatch.elapsed.inSeconds / fileAnalyzedCount} seconds per image, skipped $fileSkippedCount images)",
|
||||
);
|
||||
_logStatus();
|
||||
} catch (e, s) {
|
||||
_logger.severe("indexAllImages failed", e, s);
|
||||
} finally {
|
||||
|
|
|
@ -12,7 +12,7 @@ description: ente photos application
|
|||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
|
||||
version: 0.8.106+630
|
||||
version: 0.8.108+632
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue