Spaces:
Sleeping
Sleeping
Commit History
-
fix(backend): balanced clustering, retry failed transcriptions, pytest
- Clustering: switch from average-linkage agglomerative to k-means on normalized embeddings. On the real 740-reel library the old method put 96% of reels into two clusters (404/306) and left singletons; k-means gives 12 groups of 33-106. - Worker: a failed transcription now raises so the reel is retried with backoff; only the final attempt settles for a caption-only extraction. Previously any Whisper error silently produced a caption-only "done" row. - Tests: verify_pipeline.py's hand-rolled runner becomes pytest (backend/test_pipeline.py, monkeypatch fixtures). Drops two hasattr-only tests; adds clustering balance and transcription retry tests. Dev dependencies live in requirements-dev.txt. - Remove batch_import.py, superseded by POST /extract/batch. Claude-Session: https://claude.ai/code/session_0166W7S7XvHg5P2uyJtP4GiCf39e6ee