[mob][photos] resolve merge conflict

This commit is contained in:
laurenspriem
2024-08-23 17:48:18 +02:00
parent 44a6f256d6
commit abd5234e7c
3 changed files with 7 additions and 6 deletions

View File

@@ -1,7 +1,9 @@
import "dart:io" show Platform;
const faceMlVersion = 1;
const clipMlVersion = 1;
const clusterMlVersion = 1;
const minimumClusterSize = 2;
const embeddingFetchLimit = 200;
const fileDownloadMlLimit = 10;
final fileDownloadMlLimit = Platform.isIOS ? 5 : 10;

View File

@@ -170,7 +170,7 @@ class MLService {
_isIndexingOrClusteringRunning = true;
_logger.info('starting image indexing');
final Stream<List<FileMLInstruction>> instructionStream =
fetchEmbeddingsAndInstructions();
fetchEmbeddingsAndInstructions(fileDownloadMlLimit);
int fileAnalyzedCount = 0;
final Stopwatch stopwatch = Stopwatch()..start();

View File

@@ -152,9 +152,8 @@ Future<List<FileMLInstruction>> getFilesForMlIndexing() async {
return sortedBylocalID;
}
Stream<List<FileMLInstruction>> fetchEmbeddingsAndInstructions({
int yieldSize = fileDownloadMlLimit,
}) async* {
Stream<List<FileMLInstruction>> fetchEmbeddingsAndInstructions(
int yieldSize,) async* {
final List<FileMLInstruction> filesToIndex = await getFilesForMlIndexing();
final List<List<FileMLInstruction>> chunks =
filesToIndex.chunks(embeddingFetchLimit);
@@ -167,7 +166,7 @@ Stream<List<FileMLInstruction>> fetchEmbeddingsAndInstructions({
for (final batch in batches) {
yield batch;
}
continue;
continue;
}
final Set<int> ids = {};
final Map<int, FileMLInstruction> pendingIndex = {};