Phase 2.6.1: co_occurrence_edges migration - build_co_occurrence_edges_from_qdrant() - Qdrant embeddings → frame grouping → YOLO objects - Result: 6679 edges (vs 6701 PostgreSQL) Phase 2.6.2: face_face_edges migration - build_face_face_edges_from_qdrant() - Qdrant embeddings → frame grouping → face pairs - mutual_gaze detection preserved - Result: 6 edges (exact match) Phase 2.6.3: speaker_face_edges migration - build_speaker_face_edges_from_qdrant() - Qdrant embeddings → trace_id frame ranges - SPEAKS_AS edge creation Architecture: - All edges use Qdrant payload (no face_detections queries) - PostgreSQL fallback for empty Qdrant - Estimated 3.6x performance improvement Testing: - Playground (3003): ✓ All Phase 2.6 logs verified - Edge counts: ✓ Close match with PostgreSQL - Fallback: ✓ Working Docs: - docs_v1.0/DESIGN/TKG_PHASE2_6_EDGES_MIGRATION.md - docs_v1.0/M4_workspace/2026-06-21_phase2_6_test.md
58 lines
1.8 KiB
Bash
58 lines
1.8 KiB
Bash
#!/bin/bash
|
|
# Momentry Release Package — Verify Script
|
|
# Usage: bash verify.sh
|
|
|
|
set -euo pipefail
|
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
UUID=$(basename "$DIR")
|
|
PG_BIN="${PG_BIN:-/Users/accusys/pgsql/18.3/bin}"
|
|
DB_NAME="${DB_NAME:-momentry}"
|
|
DB_USER="${DB_USER:-accusys}"
|
|
|
|
echo "=== Package Verification ==="
|
|
echo "UUID: $UUID"
|
|
echo ""
|
|
|
|
# Check files
|
|
FILES=("data.sql" "file_info.json" "$UUID.sqlite" "$UUID.identities.json" "$UUID.asr.json" "$UUID.face.json" "$UUID.speaker_map.json")
|
|
echo "## 1. File Integrity"
|
|
for f in "${FILES[@]}"; do
|
|
if [ -f "$DIR/$f" ]; then
|
|
SIZE=$(ls -lh "$DIR/$f" | awk '{print $5}')
|
|
echo " ✅ $f ($SIZE)"
|
|
else
|
|
echo " ⚠️ $f (not found)"
|
|
fi
|
|
done
|
|
|
|
# Check DB (if accessible)
|
|
if "$PG_BIN/psql" -U "$DB_USER" -d "$DB_NAME" -c "SELECT 1" >/dev/null 2>&1; then
|
|
echo ""
|
|
echo "## 2. Database"
|
|
for tbl in chunk face_detections tkg_nodes tkg_edges identities identity_bindings; do
|
|
COUNT=$("$PG_BIN/psql" -U "$DB_USER" -d "$DB_NAME" -t -A -c "SELECT COUNT(*) FROM dev.$tbl WHERE file_uuid='$UUID' OR uuid='$UUID'" 2>/dev/null || echo "N/A")
|
|
echo " $tbl: $COUNT"
|
|
done
|
|
else
|
|
echo ""
|
|
echo "## 2. Database (offline — check $UUID.sqlite)"
|
|
if [ -f "$DIR/$UUID.sqlite" ]; then
|
|
python3 -c "
|
|
import sqlite3
|
|
conn = sqlite3.connect('$DIR/$UUID.sqlite')
|
|
c = conn.cursor()
|
|
for tbl in ['chunk', 'face_detections', 'identities', 'tkg_nodes', 'tkg_edges']:
|
|
c.execute(f'SELECT COUNT(*) FROM {tbl}')
|
|
print(f' {tbl}: {c.fetchone()[0]}')
|
|
conn.close()
|
|
" 2>/dev/null || echo " (sqlite3 unavailable)"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|
|
echo "## 3. Pipeline Status"
|
|
echo " $("$PG_BIN/psql" -U "$DB_USER" -d "$DB_NAME" -t -A -c "SELECT status FROM dev.videos WHERE file_uuid='$UUID'" 2>/dev/null || echo "unknown")"
|
|
|
|
echo ""
|
|
echo "=== Verification Complete ==="
|