sliftutils 1.4.61 → 1.4.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "1.4.61",
3
+ "version": "1.4.63",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
package/spec.txt CHANGED
@@ -1,11 +1,5 @@
1
1
 
2
2
 
3
3
 
4
- Compact face_frames3
5
4
 
6
-
7
-
8
- When detecting faces in the JavaScript code and the Python code. Let's make it so that we only store the face frames for the top 10 characters. We can show the store the embeddings for all of them, But for the face frames collection only store the top 10 faces. The other ones will just be blank, and that should be fine. Also, let's make sure when we're storing them the max dimension is 128 pixels and the quality is only 80.
9
-
10
-
11
- Then go verify on the other site fixing up the bad data. It should be quite fast because there's so much overlap, but we will find out.
5
+ Create a companion large data storage thing. which updates the data less frequently, Where we reference it with unique IDs so we don't have to merge as much and it doesn't have to be as strict. This should allow our large databases to be merged faster, even though they are pretty fast to merge at the moment, but they probably will get slower if we make them 10 times bigger.
@@ -663,7 +663,10 @@ export class BulkDatabaseBase<T extends { key: string }> {
663
663
  let lastStepMs = mergeStartMs;
664
664
  const log = (line: string) => {
665
665
  const now = Date.now();
666
- steps.push(`${blue(formatTime(now - lastStepMs))} ${line}`);
666
+ let lineFormatted = `${blue(formatTime(now - lastStepMs))} ${line}`;
667
+ // DO NOT REMOVE THIS LOG! Obviously, we should be logging as we run, or else we don't get progress. Why would we stop getting progress? Progress is almost more important than showing a summary at the end...
668
+ console.log(lineFormatted);
669
+ steps.push(lineFormatted);
667
670
  lastStepMs = now;
668
671
  };
669
672
  log(`${magenta("read")}: ${inputs.length} input file(s), ${fmtBytes(inTotal)}`);
@@ -359,6 +359,7 @@ async function executeBatch(
359
359
  }
360
360
  if (!contributes) continue;
361
361
 
362
+ let bytesRead = 0;
362
363
  for (let fi = 0; fi < plans.length; fi++) {
363
364
  const plan = plans[fi];
364
365
  for (let ci = 0; ci < plan.columns.length; ci++) {
@@ -373,9 +374,11 @@ async function executeBatch(
373
374
  throw new Error(`Expected ${run.byteLength} bytes from source #${si} (${sourceNames[si]}) column ${col.name} rows [${run.sourceStartRow}, ${run.sourceEndRow}), got ${bytes.length}`);
374
375
  }
375
376
  bytes.copy(target.blob, target.dataStart + run.outputByteStart);
377
+ bytesRead += bytes.length;
376
378
  }
377
379
  }
378
380
  }
381
+ log(`${magenta("input")} ${sourceNames[si]}: ${fmtBytes(bytesRead)} read`);
379
382
  }
380
383
 
381
384
  // Assemble + write each output file in this batch.