[mob][photos] resolve merge conflict
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user