ML data included by default, --exif is the opt-in, --all aliases --exif

ML data (face detections, CLIP embeddings) is now fetched by default
in backup-metadata. Use --no-ml to skip it. EXIF extraction (which
requires downloading every file) remains opt-in via --exif. --all is
an alias for --exif.
This commit is contained in:
2026-06-09 17:38:15 -04:00
parent 8cd57f4d12
commit 21a1a78f07
3 changed files with 41 additions and 16 deletions

View File

@@ -587,8 +587,8 @@ describe("quak backup-metadata", () => {
expect(fileMeta.mlData.clip.embedding).toEqual([0.5, 0.6, 0.7]);
});
it("does not include ML data when --ml is not set", async () => {
const outDir = join(testDir, "no-ml");
it("includes ML data by default", async () => {
const outDir = join(testDir, "ml-default");
const client = await Client.login({
email: TEST_EMAIL,
password: TEST_PASSWORD,
@@ -597,6 +597,28 @@ describe("quak backup-metadata", () => {
await runMetadataBackup(client, outDir);
const collDirs = readdirSync(join(outDir, "collections"));
const vacDir = collDirs.find((d) => d.includes("Vacation"))!;
const fileMeta = JSON.parse(
readFileSync(
join(outDir, "collections", vacDir, "100.json"),
"utf-8",
),
);
expect(fileMeta.mlData).toBeDefined();
expect(fileMeta.mlData.face.faces[0].faceID).toBe("face-abc");
});
it("excludes ML data when mlData: false", async () => {
const outDir = join(testDir, "no-ml");
const client = await Client.login({
email: TEST_EMAIL,
password: TEST_PASSWORD,
apiOptions: { fetch: buildMetaFetch(mock) },
});
await runMetadataBackup(client, outDir, { mlData: false });
const collDirs = readdirSync(join(outDir, "collections"));
const vacDir = collDirs.find((d) => d.includes("Vacation"))!;
const fileMeta = JSON.parse(