πŸ“ DMS-NX__ISE_v9.6__Chapter3_Checkpoint_2026-09-25.mdv4.4 · 2026-09-05

DMS/NX: Chapter 3 Session Checkpoint

Session: 2026-09-25 (evening) | Andrew.human & Claude.ai Continued from: DMS-NX__ISE_v9.6__Checkpoint_2026-09-25.md (Chapter 2 close-out)


What this session covered

  1. Audio search design settled. CLAP runs on Clone and produces tags. Live never loads CLAP.
  2. MediaProcessor.py ISE v9.21. Audio items no longer stall the run.
  3. Dev (32-bit) Python sync finished. Uses dev_py_sync_v1.0.2.sh.
  4. Clone (64-bit) Python rebuilt to match Live. Tarballs replaced rsync.
  5. CLAP model on Clone. Downloaded from Hugging Face, blob-verified against Live.
  6. CLAP smoke test on Clone. Timings below.
  7. Live tidy-up. Dead torch 1.4.0, clip 1.0 and an orphaned caffe2 removed.

Standing policies (carried forward, unchanged)


1. Audio search design (decided)

Decision Detail
Where CLAP runs Clone only. It peaked at 1.5–1.6 GB, which Live's 2 GB box can't afford for every search
How Live searches audio Tags, not live CLAP. On Clone, CLAP scores each track or window against a fixed, editable vocabulary (genre, mood, instrument, vocals, tempo, sound type). The top tags are stored as caption text. Live's MediaSearch keyword gate matches against them, so no model loads on Live
Trade-off (accepted) No free-text semantic queries for audio ("sounds like a rainy night"). This matches the v1.2.0 keyword gate already applied to images
Regular vs long ≀ 15 min = regular: 6 evenly spaced 10 s samples, averaged into one whole-track vector plus tags. > 15 min = long mix: one 10 s window every 30 s, each stored separately, plus a whole-track average
Store keys Windows use <id_attach>_a<start_sec>. Never _t, which is the video-frame convention that MediaSearch's is_video check depends on
Stored vectors The 512-dim CLAP vectors are kept, so changing the vocabulary only needs a cheap re-tag, not a new audio pass
Files ISE_Data/audio_store.json and ISE_Data/audio_checkpoint.json. Written on Clone and pushed to Live
Model cache AudioProcessor must pass cache_dir=ISE_Data/hf_cache explicitly. Otherwise it looks under hub/, misses the model, and re-downloads 744 MB

2. MediaProcessor.py ISE v9.21 (delivered)

Bug: MediaIndexer catalogs mp3/wav into media_store.json. MediaProcessor produced no embedding for them but still counted each one as processed. The ~49 audio items used up --chunk-size slots on every run, and the checkpoint's remaining could never reach 0.

Fix:

Mock-tested; not yet run on Live.

Known side effect: processor_checkpoint.json is only rewritten when a new item is processed, so an old on-disk copy keeps its stale remaining until then.

Not in v9.21: the silent 60 s get_video_duration() fallback when ffprobe is missing (task 8). Planned for v9.22.


3. The 925 unexplained IDs (index-time half identified)


4. Dev (old 32-bit, i686): complete

dev_py_sync v1.0.2 (delivered)

Final run: 3 installed, 54 already current, 1 held, 4 expected failures (3.6 cryptography; 3.8 numpy, PyYAML, brotli). None of the four is needed on Dev.

Other changes on Dev:

To do on Dev:


5. Clone (64-bit Dev): Python now matches Live

Why rsync was abandoned: Andrew's home link to Live has about 400 ms latency and about 10% loss. A single rsync stream of mostly-changed files crawled for more than an hour, and part of that was copying the dead torch just deleted on Live.

Method used instead: tar on Live, then pull the single file with rsync --partial, md5 both ends, move the old folder aside, unpack, import-test, and only then delete the old folder.

Part How Result
/usr/local/lib/python3.6 Tarball (240 MB β†’ 50 MB) βœ“
/root/.local/lib/python3.6 Tarball (15.6 MB after removing caffe2) βœ“ Live's 3.6 numpy lives here (a pip --user install); the first attempt failed until this was included
/usr/local/lib/python3.8 Not copied. A stale __pycache__ ("marshal data too short") was breaking torch; deleting the caches fixed it βœ“
3.8 missing packages pip install of 12 packages, pinned to Live's versions. pycryptodomex needed CFLAGS="-std=gnu99", because gcc 4.4 rejects C99 loops and the manylinux2014 wheels need glibc 2.17 βœ“
/opt/python-3.12.11, /opt/yt-dlp-venv, /root/venv-audio-test One tarball (unpacked over existing folders) βœ“ 3.12 has OpenSSL 1.1.1w; yt-dlp 2026.08.19
/usr/local/bin/python3 ln -sfn python3.6 βœ“ now matches Live

Found along the way:

Live-side tidy (done):


6. CLAP on Clone

Model: laion/larger_clap_music @ a0b4534a14f58e20944452dff00a22a06ce629d1. Downloaded straight from Hugging Face to ISE_Data/hf_cache in 14 min (~926 kB/s, about 8Γ— the Live link).

Verification: all 8 of Live's blobs match exactly, including pytorch_model.bin at 776,444,665 bytes. Clone has two extra small files (README.md, .gitattributes) because snapshot_download fetches the whole repository.

Smoke test on Clone (/var/www/html/The_ISE_Project/clap_smoketest.py):

Live Clone
Load not recorded 29.4 s
One 10 s window 23.4 s 19.6 s
Peak RSS 1484 MB 1627 MB
Text embed (2 labels) not recorded 0.69 s

Why Clone wasn't much faster: clap_smoketest.py hard-codes torch.set_num_threads(2), and Clone has nproc = 4. AudioProcessor will default to nproc threads.

venv-audio-test: it borrows torch, numpy and huggingface_hub from the system 3.8, and adds only transformers 4.27.4, tokenizers 0.13.0 and the torch stub. It can't be moved or renamed (absolute paths are baked in), and it breaks if the system 3.8 changes. Call /root/venv-audio-test/bin/python directly; no activate or deactivate needed.


Mirror excludes (reference)

Path Clone Dev Why
ISE_Data/hf_cache/ exclude exclude 1.3 GB; Clone downloads its own CLAP, Dev can't use it
ISE_Data/audio_store.json*, ISE_Data/audio_checkpoint.json exclude keep Clone writes these; a Live→Clone pull would delete or overwrite work in progress
ISE_Data/frame_cache/, ISE_Data/caption_tmp/ exclude exclude MediaProcessor scratch on Live
.cache/pip/ exclude exclude pip download cache

Keep frame_cache/ on Live. MediaProcessor needs it to retry failed video-frame captions.


Pending tasks (in order)

  1. Clone VM restore point. Full copy of the VM files at this known-good state. Then delete any stale VMware snapshot from before the Python sync.
  2. AudioProcessor.py v1.0 + editable tag vocabulary. Claude is writing these now. Inputs received: core_utils.py v1.2.0, clap_smoketest.py v0.1.0, nproc=4.
  3. Plan mode on Clone: window count and estimated run time for the 49 tracks.
  4. Full AudioProcessor run on Clone under nohup, then push audio_store.json to Live.
  5. MediaSearch audio support: read audio_store.json tags, 🎡 cards, collapse long-mix windows per track.
  6. MediaIndexer: exclude avatars and thumbnails at index time, plus --purge-excluded (700 of the 925).
  7. CPR: shared extension map in core_utils, and add webp/3gp there.
  8. ffprobe on Live. Copy from Clone /usr/local/bin/ffprobe, then MediaProcessor v9.22 to report ffprobe failure unconditionally.
  9. Refresh Live's baseline: cd / && bash /root/py_inventory.sh, not redirected, because a redirect replaces the real file with the "Wrote …" line. Then a final Clone diff.
  10. Optional: v1.0.2 of clone_py_sync (tarballs for first copy, rsync for top-ups, /root/.local included, md5 checks) and add cd / to py_inventory.sh.
  11. Dev: delete hf_cache and caption_tmp; add mirror excludes.
  12. Conversation transcripts (.md + .pdf) for Chapters 2 and 3. Not yet written.

Scripts / files delivered this session

File Status
MediaProcessor.py (ISE v9.21) Delivered; mock-tested
dev_py_sync_v1.0.2.sh Delivered; run on Dev and confirmed
DMS-NX__ISE_v9.6__Chapter3_Checkpoint_2026-09-25.md This file

Key paths

Live 128.199.200.202 (hostname forum)          Clone (64-bit, NUC)          Dev (i686, retiring)

/var/www/html/ISE_Data/
hf_cache/models--laion--larger_clap_music (744 MB; Live + Clone)
hf_cache/hub/ (CLIP; Live)
media_store.json / embeddings_store.json / captions_store.json
audio_store.json + audio_checkpoint.json (TO BE BUILT ON CLONE)
/var/www/html/The_ISE_Project/clap_smoketest.py
/var/www/html/Collabware/core_utils.py (v1.2.0)
/root/venv-audio-test/ (Python 3.8 venv, CLAP stack)
/root/.local/lib/python3.6/site-packages/ (Live 3.6 numpy, regex, ftfy, ...)
Attachment dirs: /var/www/html/attachments (id_folder 1), /var/www/html/attachments2 (id_folder 2)

DMS/NX Chapter 3 session checkpoint, 2026-09-25