[object Object]

← back to Dw Photo Capture

nightly embed top-up script + plist draft (coverage anti-decay: both embedders resumable + index hot-reload)

2212c21ba13476407341ef95685bc69fc3c153bd · 2026-07-13 01:29:32 -0700 · Steve Abrams

Files touched

Diff

commit 2212c21ba13476407341ef95685bc69fc3c153bd
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 13 01:29:32 2026 -0700

    nightly embed top-up script + plist draft (coverage anti-decay: both embedders resumable + index hot-reload)
---
 .../com.steve.visual-search-embed-nightly.plist    | 22 ++++++++++++++++++++++
 visual-search/embed-nightly-mac2.sh                | 20 ++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/visual-search/com.steve.visual-search-embed-nightly.plist b/visual-search/com.steve.visual-search-embed-nightly.plist
new file mode 100644
index 0000000..3fb14c6
--- /dev/null
+++ b/visual-search/com.steve.visual-search-embed-nightly.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>Label</key>
+  <string>com.steve.visual-search-embed-nightly</string>
+  <key>ProgramArguments</key>
+  <array>
+    <string>/bin/bash</string>
+    <string>/Users/macstudio3/Projects/dw-photo-capture/visual-search/embed-nightly-mac2.sh</string>
+  </array>
+  <key>StartCalendarInterval</key>
+  <dict>
+    <key>Hour</key><integer>4</integer>
+    <key>Minute</key><integer>20</integer>
+  </dict>
+  <key>StandardOutPath</key>
+  <string>/Users/macstudio3/Library/Logs/visual-search-embed-nightly.log</string>
+  <key>StandardErrorPath</key>
+  <string>/Users/macstudio3/Library/Logs/visual-search-embed-nightly.log</string>
+</dict>
+</plist>
diff --git a/visual-search/embed-nightly-mac2.sh b/visual-search/embed-nightly-mac2.sh
new file mode 100755
index 0000000..07e700a
--- /dev/null
+++ b/visual-search/embed-nightly-mac2.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Mac2 nightly embed top-up — keeps CLIP coverage of the ACTIVE catalog from decaying
+# as new products land. Runs both embedders resumably (each skips already-done rows),
+# then hot-reloads the search index. Safe to run any time; $0 local.
+# launchd: com.steve.visual-search-embed-nightly (see plist next to this script).
+set -u
+cd "$(dirname "$0")" || exit 1
+export DW_UNIFIED_DB="${DW_UNIFIED_DB:-postgresql://stevestudio2@/dw_unified?host=/tmp}"
+PY=./.venv-similar/bin/python
+LOG=embed-nightly.log
+
+echo "$(date -u +%FT%TZ) nightly: start" >> "$LOG"
+# 1) vendor_catalog stragglers (existing embedder, resumable)
+nice -n 15 "$PY" embed_catalog.py --workers 16 --limit 20000 >> "$LOG" 2>&1
+# 2) shopify-only actives (gap embedder, resumable via negative-key placeholders)
+nice -n 15 "$PY" embed_shopify_gap.py --workers 16 >> "$LOG" 2>&1
+# 3) refresh the in-RAM index so new vectors are searchable
+curl -s --max-time 120 http://127.0.0.1:9914/reload >> "$LOG" 2>&1
+echo "" >> "$LOG"
+echo "$(date -u +%FT%TZ) nightly: done" >> "$LOG"

← bdba9e2 visual-search: path-(a) Kamatera self-host bundle (lite venv  ·  back to Dw Photo Capture  ·  chore: session close snapshot (visual-search) dd6e416 →