Commit Graph

15 Commits

Author SHA1 Message Date
ericwyuan
8a62c46194 docs: update PROGRESS.md - Gemini视觉解析排查结论+业务全流程图 2026-08-20 16:15:28 +08:00
ericwyuan
a2554c9df0 docs: update PROGRESS.md - 视频上传问题根因(网络+逻辑双叠加)与四项修复 2026-08-20 15:36:35 +08:00
ericwyuan
a9a1b1dda5 docs: update PROGRESS.md - 串行上传+5MB分块+看门狗+chunk_size防护 2026-08-20 14:20:00 +08:00
ericwyuan
fb4ccb64dc docs: update PROGRESS.md - 异步队列架构 + e2e验证 + 超时修复
新增任务 #43-47:
- SQLite异步队列 + TokenBucket速率限制 (Gemini 1000/NVIDIA 40 RPM, 2x burst)
- NAS Dispatcher enqueue模式 + Poller线程
- 超时分离模式 (10s connect, 60s read) + stale_timeout 600s
- e2e验证: task 312 (5.7MB) 全链路 93s PASS

新增技术决策 #14-16
新增待办 #51: 生产视频预压缩 (360MB HTTP上传超时)
2026-08-20 12:18:58 +08:00
ericwyuan
a4b9178a59 docs: update PROGRESS.md with NVIDIA/dispatcher fixes + batch processing validation
- Task 39: NVIDIA single-frame JSON parsing fix
- Task 40: Gemini timeout + circuit breaker tuning
- Task 41: dispatcher crash on invalid failure_stage
- Task 42: batch processing validated (task 291/297 SUCCESS)
2026-08-20 11:18:22 +08:00
ericwyuan
2e43afb6b2 docs(README/PROGRESS): 文档收尾,与架构重构代码对齐
1. README 8.3 节:fam-core 配置示例更新(video_dir 生产路径 + chat_handler.qa_url),fam-edge 配置示例对齐新架构(role/usage=qa_fallback、gemini-flash-latest、实际 timeout)
2. README 1.3 节:历史视频积压标记已处理(forward-only);吞吐不足表述更新(无本地融合)
3. README 5.3 节:改名为云端结构化输出 JSON Schema,描述适配器解析 + format_cloud_result 校验两阶段
4. README 6.2 节:移除融合 timeout 行,num_predict 更新为 512,已知问题改述为专职问答兜底
5. README 10.5/10.6 节:Gemini 模型名修正为 gemini-flash-latest;NVIDIA 验证状态更新为已验证
6. README 12 节:架构重构与双端部署验证纳入已完成;v1.1 待办移除已完成项 1-5,保留单元测试/Tailscale/daily_summaries
7. PROGRESS.md:服务状态表更新(新架构、qwen2.5:7b);任务进度追加 32-38;技术决策记录追加云端直出直存与 Q&A 降级;聊天链路验证段更新为 run_qa 编排
2026-08-20 10:45:29 +08:00
ericwyuan
5adda97829 docs: add real video benchmark results to PROGRESS.md
- 30min 360MB video pipeline: 70s transfer + 39s keyframe + 820s AI = 929s total
- FFmpeg fast seek optimization: 180s+ → 33s (6-8x faster)
- AI analysis is the bottleneck: avg 68s/frame, 0.9 tokens/s on ARM CPU
2026-08-20 02:31:06 +08:00
ericwyuan
727642d38b feat: adaptive keyframe count based on video duration
- Replace fixed 5-8 keyframe limit with duration-based adaptive sizing
- Candidate frames: clamp(duration_min × 2, 30, 120)
- Keyframe cap: clamp(duration / 150s, 8, 30)
- 30min video → 12 keyframes (was 8), 60min → 24, 120min → 30
- Short videos (<12min) still get floor of 8 keyframes
- Add Ollama keep-alive config doc to PROGRESS.md (OLLAMA_KEEP_ALIVE=-1)
- Update config.yaml and config.yaml.example with new video params
2026-08-20 01:29:14 +08:00
ericwyuan
c596bf7603 feat: FAM-UI deployed on NAS (Streamlit 1.61.1)
- Streamlit 1.61.1 + pandas 2.3.3 installed in fam-ui venv (Python 3.10)
- FAM-UI running headless on 0.0.0.0:8501, HTTP 200, health=ok
- config.yaml synced to NAS (core_url + MariaDB unix_socket)
- All 5 services now running: FAM-Core, FAM-Edge, FAM-UI, MariaDB, Ollama
- PROGRESS.md: task 27 complete
2026-08-20 00:36:37 +08:00
ericwyuan
06e1e5a307 docs: update PROGRESS.md with chat proxy, Tailscale status, E2E results 2026-08-20 00:03:57 +08:00
ericwyuan
c8cd2f2665 fix: MariaDB JSON path compat for name_member + FAM-Core API verified
- name_member(): replace MySQL-only JSON_REPLACE/JSON_CONTAINS with wildcard
  JSON paths (unsupported in MariaDB 10.11) with Python-side JSON parsing
- FAM-Core venv rebuilt with Python 3.10.20 on NAS
- All API endpoints tested: health, status, member list, unnamed, naming
- POST /api/member/name: 人物A successfully named to 张三
- PROGRESS.md updated with full test results and task completion
2026-08-19 23:48:35 +08:00
ericwyuan
66b499725d [deploy] FAM-Core + FAM-Edge 服务启动 + Tailscale 跨服务器验证
- FAM-Core (NAS:8000): gunicorn 启动成功, scheduler+dispatcher 运行中
- FAM-Edge (Oracle:5000): gunicorn 启动成功, ollama 健康检查通过
- Tailscale 跨服务器连通: Oracle→NAS FAM-Core health=ok
- config.yaml 同步到 Oracle, FAM-Edge /health 返回 healthy_models=[ollama]
- PROGRESS.md 更新服务运行状态表
2026-08-19 23:32:35 +08:00
ericwyuan
47658fa068 [deploy] PyMySQL 替换 + Tailscale 组网 + config.yaml + 路径修复
- db_layer.py: mysql-connector-python(19MB) → PyMySQL(45KB), 去掉连接池
- config_loader.py: 修复路径解析 (2级→3级 dirname), FAM-Core + FAM-Edge 均修复
- Tailscale 组网完成: Oracle=100.74.137.126, NAS=100.70.234.39, 互通验证通过
- NAS Python 依赖: flask/gunicorn/pymysql/PyYAML 全部安装成功
- NAS 代码部署: /volume1/web/sentinel-home-ai/, FAM-Core 7 模块导入 PASS
- NAS DB 连接验证: PyMySQL → MariaDB 10.11.11, 6 张表可见, PASS
- config.yaml 创建: FAM-Core + FAM-Edge + FAM-UI (Tailscale IP + 密码)
- requirements.txt: mysql-connector-python → PyMySQL
2026-08-19 23:27:28 +08:00
ericwyuan
e5ac667586 [deploy] NAS MariaDB DDL 执行 + Tailscale 状态 + README 更新
- NAS MariaDB 10.11.11 确认可用, root 密码 iLoveJava5!
- DDL 执行成功: sentinel_home_ai 库 + 6 张表 (process_tasks, monitor_events, daily_summaries, event_details, chat_history, family_members)
- NAS Tailscale 已运行, IP: 100.70.234.39
- Oracle Tailscale 1.102.2 已安装, 待用户认证
- README 新增 MariaDB 密码 + Tailscale IP + NAS 型号信息
- PROGRESS.md 更新全部环境状态
2026-08-19 23:08:21 +08:00
ericwyuan
50d83539f6 [deploy] Oracle 环境部署 + 模型基准测试 + OllamaAdapter 优化
- Oracle 依赖安装: flask/gunicorn/requests/PyYAML/opencv/numpy 全部成功
- FAM-Edge 全部 8 个模块导入验证 PASS
- llava-phi3 基准测试: 冷启动 109s, 预热无限制 13.35s, 预热+num_predict=30 仅 4.34s PASS
- OllamaAdapter 新增 num_predict 可配置参数 (默认 500)
- config.yaml.example 新增 num_predict 配置项
- 创建 PROGRESS.md 进度追踪文档
2026-08-19 23:01:21 +08:00