A file's JSON holds keywords in place of its CLIP embedding (closes #218) #220

Merged
clawbot merged 6 commits from issue-218-clip-keywords into next 2026-10-22 23:32:25 +02:00
6 Commits
Author SHA1 Message Date
clawbot 16eafaa4b6 Say in the README's opening that the backup writes keywords
check / check (push) Waiting to run
The opening said the backup keeps Ente's ML data for each file but did
not say it leaves out the CLIP embedding and writes the file's keywords
in its place. That now has a sentence of its own, and the rest of the
long sentence is split into shorter ones.

Model: opus-5-5
2026-10-22 21:04:16 +00:00
clawbot ae003d8775 Test ML data with faces and no CLIP embedding, and name the norm
check / check (push) Waiting to run
Each backup command's tests now have a file whose ML data holds faces and
no CLIP embedding; its JSON has the ML data and no keywords. The helper
that gives a vector's norm is called norm. The README names what a
video's JSON lacks, and the generator states its download size with the
Python packages counted.

Model: opus-5-5
2026-10-22 20:33:05 +00:00
clawbot c65b0fae79 Share clipEmbedding, and shorten the README's keyword sentences
check / check (push) Waiting to run
clipKeywords takes the CLIP embedding out of a file's ML data with
clipEmbedding, now exported from src/library/mldata.ts, and adds only its own
checks: 512 numbers, not all zero. bin/clip-keyword-vectors puts its body in
a main function called at the bottom, as the scripts under script/ do; it
writes the same files. The README lists the Discover categories as bullets
and states the score, the rule and the video rule in short sentences of their
own.

Model: opus-5-5
2026-10-22 19:25:40 +00:00
clawbot 791f17b84e Test that a video gets no keyword from a category that leaves out videos
quak backup and quak backup-metadata each get a photo and a video whose CLIP
embedding is the text embedding of Identity, a Discover category that leaves
out videos. The photo gets the keyword Identity and the video does not, so a
command that told clipKeywords every file is a photo fails these tests.

Model: opus-5-5
2026-10-22 19:25:40 +00:00
clawbot 5ec176550f A file's JSON holds keywords in place of its CLIP embedding (closes #218)
check / check (push) Waiting to run
quak backup and quak backup-metadata write each file's ML data without its
CLIP embedding, and keywords in its place: the titles of the Discover
categories of Ente's photos app that the file falls in, by the app's rule.
src/clip-keywords.ts applies the rule. src/clip-keyword-vectors.ts holds the
16 categories from Ente's discover.json with the text embedding Ente's CLIP
text model gives each query. bin/clip-keyword-vectors writes that file and the
test fixture in a digest-pinned Python image, with every download pinned by
sha256; it runs by hand only. quak gains no dependency.

Model: opus-5-5
2026-10-22 18:36:38 +00:00
clawbot 4863833f0a Test keywords in place of the CLIP embedding in a file's JSON
check / check (push) Waiting to run
clipKeywords takes a file's ML data and whether it is a video, and gives the
titles of the Discover categories of Ente's photos app that its CLIP embedding
falls in, highest score first. The tests cover the rule with made-up vectors
and Ente's real categories with the CLIP embedding of a public-domain photo of
a sunset. The backup and backup-metadata tests now expect keywords in a file's
JSON and no CLIP embedding in its mlData. These tests fail until the
implementation lands.

Model: opus-5-5
2026-10-22 18:36:30 +00:00