Commit d8fd2d15 d8fd2d15ecdcd77313117c6a0c7020a6926cbd7c by cnb.bofCdSsphPA

Preserve a fast handoff entrypoint for the ACR roadmap

Constraint: The startup handoff must reflect the new Phase-1 encoder-only and PostgreSQL v2 decisions without carrying stale timeline noise
Rejected: Keep appending runtime logs to session-handoff.md | It obscures the current start point for the next session
Confidence: high
Scope-risk: narrow
Directive: Keep session-handoff.md focused on where to resume next, and move detailed chronology into changelog/history docs
Tested: git diff --check -- docs/session-handoff.md docs/CHANGELOG.md
Not-tested: No link checker or markdown linter was run
1 parent 4b23f546
1 ## 2026-06-04 1 ## 2026-06-04
2 2
3 - 重写 [session-handoff 交接文档](./session-handoff.md),将其从历史流水账收敛为“下次启动即用”的启动手册,明确当前稳定结论、推荐阅读顺序、已验证/未验证边界,以及下一步应从 PostgreSQL v2 schema 与 Phase-1 encoder-only 执行链开始推进。
3 - 新增 [Phase-1 实施清单](./phase1-implementation-checklist.md),把 encoder-only 路线拆成主数据、reference set、feature set、索引、评测的可执行阶段。 4 - 新增 [Phase-1 实施清单](./phase1-implementation-checklist.md),把 encoder-only 路线拆成主数据、reference set、feature set、索引、评测的可执行阶段。
4 - 新增 [模型与 Feature Set 初始化手册](./model-feature-registry-bootstrap.md),补齐 model_registry / feature_set_registry / reference_set_registry 的初始化约定与示例 SQL。 5 - 新增 [模型与 Feature Set 初始化手册](./model-feature-registry-bootstrap.md),补齐 model_registry / feature_set_registry / reference_set_registry 的初始化约定与示例 SQL。
5 - 重构文档主阅读路径,新增按角色划分的文档入口:架构、开发、运维、模型底座。 6 - 重构文档主阅读路径,新增按角色划分的文档入口:架构、开发、运维、模型底座。
......
1 # Session Handoff / 持续开发交接文档 1 # Session Handoff / 持续开发交接文档
2 2
3 > 更新:2026-06-02 3 > 更新:2026-06-04
4 > 目的:让新 session / 新代理进入仓库后,能在最短时间内理解项目现状并继续开发。 4 > 目的:让下次启动的新 session 在 **3~10 分钟内** 明确:
5 5 > 1. 当前项目已经走到哪里
6 ## 一页结论 6 > 2. 应该先读哪些文档
7 7 > 3. 应该从哪一步开始推进
8 ### 最新交付快照(2026-06-03 本地 20-song + voice pipeline) 8 > 4. 哪些是当前稳定结论,哪些还只是待验证假设
9
10 - 当前样本策略已明确分层:
11 - `/workspace` 仅作为样本/素材来源
12 - `acr-engine/` 才是训练、检索、评测、服务主工程
13 - 当前本地 20-song 验证路线已固定:
14 - 本地小样本优先 **FAISS**
15 - `chromadb` 作为可选对照后端
16 - 生产环境继续保留 **pgvector**
17 - 新增本地 20-song 入口:
18 - `acr-engine/scripts/local_music20_acr.py`
19 - 结果产物:`acr-engine/data/local_eval/music20_summary.json`
20 - 当前本地 20-song 结果:
21 - `type_1 -> type_11`: `top1=1.0`, `top3=1.0`
22 - `type_7 -> type_11`: `top1=0.45`, `top3=0.65`
23 - `type_8 -> type_11`: `top1=0.4667`, `top3=0.7333`
24 - `type_16 -> type_11`: `top1=0.4167`, `top3=0.4167`
25 - 新增哼唱/录音接入基础能力:
26 - `acr-engine/src/data/voice_chunker.py`:voice -> chunk
27 - `acr-engine/scripts/build_humming_eval_manifest.py`:chunk -> `humming_real` manifest
28 - `acr-engine/src/utils/context_exporter.py`:命中 reference window -> 上下文 clip(默认 10s)
29 - FastAPI 服务当前状态:
30 - `acr-engine/src/service/app.py` 已新增 `POST /recognize/voice`
31 - `/health` 可正常启动并返回 `ok`
32 - architect review: approved with watch;当前 split(本地 FAISS / 可选 ChromaDB / 生产 pgvector)方向成立
33 - 当前 `POST /recognize/voice` 已跨过依赖缺失与超时阶段:CPU 版 `torch` 已安装、`uvicorn` / `fastapi` / `python-multipart` 已安装、`/health` 可返回 `ok`;同时 voice smoke 已切到 `corpus=workspace_music20`,返回 `chunk_count=1`, `top_song_id=109`, `has_context=true`,并附带真实 `/workspace` reference 路径。当前剩余问题是继续校验该 top1 是否与业务预期一致,而不是链路未通。
34 - 当前 docs 已做第一轮简化:
35 - `docs/README.md` 只保留最新架构与最短阅读顺序
36
37 新 session 最短启动路径(当前推荐):
38 1.`docs/session-handoff.md`
39 2.`docs/README.md`
40 3.`docs/CHANGELOG.md`
41 4. 直接从 `acr-engine/README.md``acr-engine/scripts/local_music20_acr.py` 继续
42
43 当前最重要的下一步:
44 1. 给当前解释器安装/修复 `torch`
45 2. 真正跑通 `POST /recognize/voice`
46 3. 把哼唱评测集接入 `evaluate.py` 或独立评测脚本
47 4. 继续做 docs 第二轮收敛,只保留当前有效主文档
48
49 - 已新增 song_id 级 pgvector 评测脚手架:
50 - `acr-engine/scripts/export_workspace_music20_embeddings_jsonl.py`
51 - `acr-engine/scripts/evaluate_songid_pgvector_path.py`
52 - 当前 `acr-engine/data/pgvector_eval/music20/songid_eval_report.json` 结果:
53 - overall: `top1=0.9091`, `top3=0.9545`
54 - `query_type=1`: `top1=1.0`, `top3=1.0`
55 - `query_type=7`: `top1=0.0`, `top3=0.5`
56 - 注意:当前 20-song 导出里 `query_type=8/16` 行数仍不足(0 行),说明下一步需要专门扩 business reference / query 选择,而不是只沿用当前前 20 首 reference。
57
58 - 当前 `workspace_music20` 业务正确性初测(`acr-engine/data/local_eval/voice_workspace20_type7_eval.json`):
59 - `num_queries=20`
60 - `top1=0.0`
61 - `top3=0.05`
62 - 说明当前 business sample 语义虽然已通路,但 song_id 正确性还很差,必须继续优化,不可直接当成可用识别能力。
63 - 当前已继续补齐 `type_8 / type_16` 的 business-corpus voice correctness 基线:
64 - `voice_workspace20_type8_eval.json`: `num_queries=15`, `top1=0.0`, `top3=0.0`
65 - `voice_workspace20_type16_eval.json`: `num_queries=12`, `top1=0.0`, `top3=0.0`
66 - 说明当前基于 `/workspace` 的本地 chroma+FAISS voice lane 在 hard query 上几乎不可用,后续应优先切向更接近生产的 embedding/pgvector 评测路径。
67 - architect review 当前结论:`APPROVED (WATCH)`,允许继续沿当前架构推进,但需要明确区分“链路通”与“业务正确”。
68
69 ### 最新补充(2026-06-03 voice service runtime)
70
71 - 已确认当前解释器 `/usr/local/miniconda3/bin/python` 下:
72 - `torch==2.3.1+cpu`
73 - `uvicorn==0.48.0`
74 - `fastapi==0.136.3`
75 - `python-multipart==0.0.30`
76 - `acr-engine/src/service/app.py` 当前可启动并通过:
77 - `GET /health`
78 - `GET /ready`
79 - `POST /recognize/voice` 当前不再报缺依赖,但端到端 smoke 仍会超时。
80 - 当前最可能的下一步排查点:
81 1. `voice_to_chunks` 默认切出的 chunk 数过多(当前样例可到 9 个)
82 2. 首次 `_load_engine()` + `engine.recognize()` CPU 推理耗时过长
83 3. `context_exporter` 在每个候选上再次做 reference 滑窗,进一步拉长总耗时
84 - 下一 session 建议直接从:
85 - `acr-engine/src/service/app.py`
86 - `acr-engine/scripts/service_voice_smoke.py`
87 - `acr-engine/src/data/voice_chunker.py`
88 - `acr-engine/src/utils/context_exporter.py`
89 继续收敛超时问题。
90
91 ### 最新交付快照(2026-06-02 16:12 UTC)
92
93 - 当前状态:先交付,后续重启继续
94 - 当前最佳候选:`hum_focus`
95 - 最新复核:`hum_guard` 未超过 `hum_focus`
96 - 当前可继承的文档:
97 - `docs/CHANGELOG.md`
98 - `docs/changelist-2026-06-02.md`
99 - `docs/delivery-handoff-2026-06-02.md`
100 - 新 session 最短启动路径:
101 1. 读本文件
102 2. 读 changelog
103 3.`hum_focus` 继续做小步优化
104
105 ### 最新交付快照(2026-06-02 16:03 UTC)
106
107 - 当前远程同步基线:`9c3f182`(更新前)
108 - 当前最重要的新事实:**dual-axis 候选已收敛到 hum_focus**
109 - `hum_focus`
110 - `top1=0.7`
111 - `topk=0.85`
112 - `humming_like=0.5`
113 - `confused=0.25`
114 - `hum_balanced`
115 - `top1=0.65`
116 - `topk=0.95`
117 - `humming_like=0.25`
118 - `confused=0.25`
119 - 结论:
120 - `hum_focus` 当前是这轮双轴搜索的最佳候选
121 - 下一轮应围绕 `hum_focus` 微调,而不是回到 `v6` 或继续盲搜
122 - 新 session 第一优先级:
123 1. 围绕 `hum_focus` 做小步权重搜索
124 2. 优先保住 `humming_like` 优势
125 3. 再做 real-path clean + synthetic hard-case 双轨复测
126
127 ### 最新可观测性修复(2026-06-02 15:18 UTC)
128
129 - 已为 `run_demo.py``src/engines/chromaprint_matcher.py``src/engines/ecapa_embedder.py` 的关键 `print()` 增加 `flush=True`
130 - 极小样本复现 `/tmp/chroma_repro_tiny12` 已验证:
131 - 日志文件不再保持 `0 bytes`
132 - traceback 可实时落盘
133 - 当前已确认:至少“失败时无日志”这个问题已被修复;下一步继续追真实路径 root cause。
134
135 - 验证结果补充:`RC=1`,日志中可见 `ValueError: No reference embeddings were produced ...`
136
137 这是一个正在从原型向工业化推进的 **音乐 ACR / music retrieval** 项目。
138 当前已经完成:
139
140 1. **原型可运行**
141 - synthetic 数据生成
142 - 训练
143 - 建索引
144 - 识别
145 - 评测
146
147 2. **开放数据接入链路完整闭环**
148 - inspect-local / inspect-batch
149 - prepare-local
150 - validate-local
151 - train
152 - build-index
153 - evaluate
154 - generate_artifacts
155
156 3. **文档已浓缩**
157 - docs 入口已分成 4 组
158 - 相对路径支持跳转
159 - 开放数据工作流有单页文档
160
161 当前最重要的下一步:
162 - 用真实本地 FMA / MTG-Jamendo 音频目录替换 synthetic stand-in
163 - 跑真实开放数据 smoke
164 - 继续优化准确率,尤其是 `confused` / `humming_like`
165
166 ### 最新真实 FMA 运行事实(2026-06-02 补记)
167
168 - `fma_small.zip` 已完整落地,并已解压到 `acr-engine/data/raw/fma_small_audio`
169 - `check-local-ready fma ...` 已验证:
170 - `ready_for_smoke=true`
171 - `num_audio_files=8000`
172 - `eligible_query_files=7994`
173 - 真实 FMA smoke 已实际启动到:
174 - 输出目录:`/tmp/fma_real_smoke_stopcheck`
175 - manifest 校验:`ok=true`
176 - 当前训练规模:`catalog_references=8000`, `train_queries=6401`, `test_queries=1593`
177 - 当前环境无 GPU:
178 - `nvidia-smi` => `NO_NVIDIA_GPU`
179 - `torch.cuda.is_available() = false`
180 - 因此本轮真实 smoke 当前表现为 **CPU 长训练**,不是异常卡死。
181 - 重要:`train.py` 采用 **epoch-end save** 策略,`best_model.pt` 会在 `Epoch 1` 结束后首次落盘;所以训练中途看到空的 `fma_models_smoke/` 目录是正常现象。
182
183 ---
184
185 ### 最新 checkpoint(2026-06-02 12:09 UTC)
186
187 - 真实 FMA smoke 主进程仍在运行:
188 - `PID=311494``src/data/external_adapters.py smoke-local fma ...`
189 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
190 - 最新观测:
191 - `train.py ELAPSED=12:00`
192 - `%CPU≈615`
193 - `%MEM≈10.4`
194 - manifest 仍有效:
195 - `catalog_references=8000`
196 - `train_queries=6401`
197 - `test_queries=1593`
198 - `val_queries=0`
199 - `/tmp/fma_real_smoke_stopcheck/fma_models_smoke/` 当前仍为空目录。
200 - 这是**符合当前 train.py 保存逻辑**的:`best_model.pt` 要到 `Epoch 1` 结束后才会首次落盘。
201
202 ### 当前卡点(最新)
203
204 1. **真实 FMA smoke 尚未出首个模型文件**
205 - 原因不是异常,而是当前环境无 GPU,且本次使用真实 FMA 全量 8000 首参考。
206 2. **MTG-Jamendo 目录仍未就绪**
207 - `data/raw/mtg_jamendo_audio` 当前仍缺少可用音频文件,暂时无法进入同级别 smoke。
208 3. **工作树噪音依旧很大**
209 - 提交时必须继续只显式暂存文档 / 脚本,不能误带 `data/external_smoke``data/raw`、checkpoint、`__pycache__`
210
211 ### 更新中的 fresh evidence(2026-06-02 12:11 UTC)
212
213 - 与上一版交付相比,真实 FMA smoke 仍在持续推进,而不是僵死:
214 - `train.py ELAPSED=14:25`
215 - `%CPU≈615`
216 - `%MEM≈10.4`
217 - 当前仍仅看到运行中的两个关键进程:
218 - `PID=311494``external_adapters.py smoke-local fma ...`
219 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
220 - 仍未出现 `build-index` / `evaluate` 相关新进程。
221 - `/tmp/fma_real_smoke_stopcheck/fma_models_smoke/` 仍只有目录本身,没有模型文件。
222 - manifest 再次校验结果未变:
223 - `catalog_references=8000`
224 - `train_queries=6401`
225 - `test_queries=1593`
226 - `val_queries=0`
227 - `ok=true`
228
229 这说明:
230 - 当前状态是 **真实 FMA 全量训练仍在 epoch 内部推进**
231 - 还没有到 `Epoch 1` 结束,因此仍不能期待 `best_model.pt` 已经落盘。
232
233 ### 再更新的 fresh evidence(2026-06-02 12:12 UTC)
234
235 - 真实 FMA smoke 仍在持续推进:
236 - `train.py ELAPSED=15:12`
237 - `%CPU≈614`
238 - `%MEM≈10.5`
239 - 当前进程结构仍未变化:
240 - `PID=311494``external_adapters.py smoke-local fma ...`
241 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
242 - 仍未观测到 `build-index` / `evaluate` 相关新进程。
243 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
244 - manifest 再次校验仍然通过:
245 - `ok=true`
246 - `catalog_references=8000`
247 - `train_queries=6401`
248 - `test_queries=1593`
249 - `val_queries=0`
250
251 这说明:
252 - 真实 FMA 全量 smoke 依旧在 `Epoch 1` 内部推进。
253 - 截至 12:12 UTC,仍未出现首个可落盘模型文件或下游阶段切换。
254
255 ### 再次刷新的 fresh evidence(2026-06-02 12:14 UTC)
256
257 - 真实 FMA smoke 继续推进:
258 - `train.py ELAPSED=17:07`
259 - `%CPU≈615`
260 - `%MEM≈10.4`
261 - 当前仍只有训练阶段相关进程:
262 - `PID=311494``external_adapters.py smoke-local fma ...`
263 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
264 - 仍未观测到 `build-index` / `evaluate` 新进程。
265 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
266 - manifest 复核仍通过:
267 - `ok=true`
268 - `catalog_references=8000`
269 - `train_queries=6401`
270 - `test_queries=1593`
271 - `val_queries=0`
272
273 这进一步说明:
274 - 当前 smoke 仍在第一个 epoch 内持续前进。
275 - 到 12:14 UTC 为止,仍未进入保存首个模型文件或下游检索/评测阶段。
276
277 ### 再次推进的 fresh evidence(2026-06-02 12:15 UTC)
278
279 - 真实 FMA smoke 持续推进到:
280 - `train.py ELAPSED=18:22`
281 - `%CPU≈615`
282 - `%MEM≈10.5`
283 - 当前进程结构仍未发生阶段切换:
284 - `PID=311494``external_adapters.py smoke-local fma ...`
285 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
286 - 仍未出现 `build-index` / `evaluate` 相关新进程。
287 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
288 - manifest 再次复核仍通过:
289 - `ok=true`
290 - `catalog_references=8000`
291 - `train_queries=6401`
292 - `test_queries=1593`
293 - `val_queries=0`
294
295 这说明:
296 - 当前依旧只是第 1 个 epoch 内部持续推进。
297 - 到 12:15 UTC 为止,仍没有首个模型文件或后续检索/评测阶段证据。
298
299 ### 再次延后的 fresh evidence(2026-06-02 12:16 UTC)
300
301 - 真实 FMA smoke 继续推进到:
302 - `train.py ELAPSED=19:12`
303 - `%CPU≈614`
304 - `%MEM≈10.6`
305 - 当前进程结构仍未发生阶段切换:
306 - `PID=311494``external_adapters.py smoke-local fma ...`
307 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
308 - 仍未出现 `build-index` / `evaluate` 相关新进程。
309 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
310 - manifest 再次复核仍通过:
311 - `ok=true`
312 - `catalog_references=8000`
313 - `train_queries=6401`
314 - `test_queries=1593`
315 - `val_queries=0`
316
317 这说明:
318 - 当前依旧处于第 1 个 epoch 内部的持续训练阶段。
319 - 到 12:16 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
320
321 ### 继续延后的 fresh evidence(2026-06-02 12:17 UTC)
322
323 - 真实 FMA smoke 继续推进到:
324 - `train.py ELAPSED=20:08`
325 - `%CPU≈614`
326 - `%MEM≈10.6`
327 - 当前进程结构仍未发生阶段切换:
328 - `PID=311494``external_adapters.py smoke-local fma ...`
329 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
330 - 仍未出现 `build-index` / `evaluate` 相关新进程。
331 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
332 - manifest 再次复核仍通过:
333 - `ok=true`
334 - `catalog_references=8000`
335 - `train_queries=6401`
336 - `test_queries=1593`
337 - `val_queries=0`
338
339 这说明:
340 - 当前依旧处于第 1 个 epoch 内部的持续训练阶段。
341 - 到 12:17 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
342
343 ### 持续推进的 fresh evidence(2026-06-02 12:19 UTC)
344
345 - 真实 FMA smoke 继续推进到:
346 - `train.py ELAPSED=22:10`
347 - `%CPU≈615`
348 - `%MEM≈10.7`
349 - 当前进程结构仍未发生阶段切换:
350 - `PID=311494``external_adapters.py smoke-local fma ...`
351 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
352 - 仍未出现 `build-index` / `evaluate` 相关新进程。
353 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
354 - manifest 再次复核仍通过:
355 - `ok=true`
356 - `catalog_references=8000`
357 - `train_queries=6401`
358 - `test_queries=1593`
359 - `val_queries=0`
360
361 这说明:
362 - 当前依旧处于第 1 个 epoch 内部的持续训练阶段。
363 - 到 12:19 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
364
365 ### 持续推进的 fresh evidence(2026-06-02 12:20 UTC)
366
367 - 真实 FMA smoke 继续推进到:
368 - `train.py ELAPSED=22:58`
369 - `%CPU≈615`
370 - `%MEM≈10.8`
371 - 当前进程结构仍未发生阶段切换:
372 - `PID=311494``external_adapters.py smoke-local fma ...`
373 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
374 - 仍未出现 `build-index` / `evaluate` 相关新进程。
375 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
376 - manifest 再次复核仍通过:
377 - `ok=true`
378 - `catalog_references=8000`
379 - `train_queries=6401`
380 - `test_queries=1593`
381 - `val_queries=0`
382
383 这说明:
384 - 当前依旧处于第 1 个 epoch 内部的持续训练阶段。
385 - 到 12:20 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
386
387 ### 30 秒窗口后的 fresh evidence(2026-06-02 12:21 UTC)
388
389 - 经过额外约 30 秒等待后,真实 FMA smoke 继续推进到:
390 - `train.py ELAPSED=24:11`
391 - `%CPU≈615`
392 - `%MEM≈11.3`
393 - 当前进程结构仍未发生阶段切换:
394 - `PID=311494``external_adapters.py smoke-local fma ...`
395 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
396 - 仍未出现 `build-index` / `evaluate` 相关新进程。
397 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
398 - manifest 再次复核仍通过:
399 - `ok=true`
400 - `catalog_references=8000`
401 - `train_queries=6401`
402 - `test_queries=1593`
403 - `val_queries=0`
404
405 这说明:
406 - 即使拉开更有意义的时间窗口,当前仍能确认训练在前进,而不是僵死。
407 - 到 12:21 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
408
409 ### 120 秒窗口后的 fresh evidence(2026-06-02 12:25 UTC)
410
411 - 经过更长的约 120 秒观察窗口后,真实 FMA smoke 继续推进到:
412 - `train.py ELAPSED=27:54`
413 - `%CPU≈615`
414 - `%MEM≈11.2`
415 - 当前进程结构仍未发生阶段切换:
416 - `PID=311494``external_adapters.py smoke-local fma ...`
417 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
418 - 仍未出现 `build-index` / `evaluate` 相关新进程。
419 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
420 - manifest 再次复核仍通过:
421 - `ok=true`
422 - `catalog_references=8000`
423 - `train_queries=6401`
424 - `test_queries=1593`
425 - `val_queries=0`
426
427 这说明:
428 - 在更长的观察窗口下,训练依然持续前进,而不是假性活动或僵死。
429 - 到 12:25 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
430
431 ### 180 秒窗口后的 fresh evidence(2026-06-02 12:29 UTC)
432
433 - 经过更长的约 180 秒观察窗口后,真实 FMA smoke 继续推进到:
434 - `train.py ELAPSED=31:47`
435 - `%CPU≈615`
436 - `%MEM≈11.0`
437 - 当前进程结构仍未发生阶段切换:
438 - `PID=311494``external_adapters.py smoke-local fma ...`
439 - `PID=311629``train.py --data /tmp/fma_real_smoke_stopcheck/fma/manifests ...`
440 - 仍未出现 `build-index` / `evaluate` 相关新进程。
441 - `fma_models_smoke/` 仍只有目录本身,没有模型文件。
442 - manifest 再次复核仍通过:
443 - `ok=true`
444 - `catalog_references=8000`
445 - `train_queries=6401`
446 - `test_queries=1593`
447 - `val_queries=0`
448
449 这说明:
450 - 在更长的观察窗口下,训练依然持续前进,而不是假性活动或僵死。
451 - 到 12:29 UTC 为止,仍没有首个模型文件或下游检索/评测阶段证据。
452
453 ### 重大阶段切换证据(2026-06-02 12:34 UTC)
454
455 - 真实 FMA smoke 已跨过最关键的 `Epoch 1` 结束点:
456 -`train.py` 进程 `PID=311629` 已结束
457 - `/tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt` 已出现
458 - `/tmp/fma_real_smoke_stopcheck/fma_models_smoke/song_to_idx.json` 已出现
459 - 当前主流程已从训练切换到建索引阶段:
460 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
461 - `external_adapters.py smoke-local ...` 主进程仍在,说明端到端 smoke 还未结束。
462 - manifest 复核仍通过:
463 - `ok=true`
464 - `catalog_references=8000`
465 - `train_queries=6401`
466 - `test_queries=1593`
467 - `val_queries=0`
468
469 这说明:
470 - 之前“模型目录为空是正常现象”的阶段已经结束。
471 - 现在的下一关键观察点已经从“等待首个模型文件”切换为“等待 `build-index` 完成并进入 `evaluate`”。
472
473 ### build-index 持续阶段证据(2026-06-02 12:37 UTC)
474
475 - 训练结束后的下游流程仍在 `build-index`
476 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
477 - `smoke-local` 主进程仍在:
478 - `PID=311494``external_adapters.py smoke-local fma ...`
479 - 当前尚未观测到 `evaluate.py` 进程。
480 - 索引输出目录已经创建:
481 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
482 - 但截至 12:37 UTC,索引目录下仍未看到新的索引产物文件。
483 - manifest 再次复核仍通过:
484 - `ok=true`
485 - `catalog_references=8000`
486 - `train_queries=6401`
487 - `test_queries=1593`
488 - `val_queries=0`
489
490 这说明:
491 - 当前 smoke 已稳定处于“训练完成 -> 建索引进行中”的阶段。
492 - 下一关键观察点仍是“索引文件出现”或“切换到 `evaluate.py`”。
493
494 ### build-index 延续证据(2026-06-02 12:39 UTC)
495
496 - 经过额外观察后,主下游进程仍然是:
497 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
498 - `evaluate.py` 仍未出现。
499 - `smoke-local` 主进程仍在:
500 - `PID=311494``external_adapters.py smoke-local fma ...`
501 - 索引目录仍只有目录本身:
502 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
503 - 截至 12:39 UTC,仍未观测到新的索引产物文件。
504 - manifest 复核仍通过:
505 - `ok=true`
506 - `catalog_references=8000`
507 - `train_queries=6401`
508 - `test_queries=1593`
509 - `val_queries=0`
510
511 这说明:
512 - 当前 smoke 已稳定进入并停留在 `build-index` 阶段。
513 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
514
515 ### build-index 再延续证据(2026-06-02 12:43 UTC)
516
517 - 经过更长观察后,主下游进程仍然是:
518 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
519 - `evaluate.py` 仍未出现。
520 - `smoke-local` 主进程仍在:
521 - `PID=311494``external_adapters.py smoke-local fma ...`
522 - 索引目录仍只有目录本身:
523 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
524 - 截至 12:43 UTC,仍未观测到新的索引产物文件。
525 - manifest 复核仍通过:
526 - `ok=true`
527 - `catalog_references=8000`
528 - `train_queries=6401`
529 - `test_queries=1593`
530 - `val_queries=0`
531
532 这说明:
533 - 当前 smoke 仍稳定停留在 `build-index` 阶段。
534 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
535
536 ### build-index 最新延续证据(2026-06-02 12:51 UTC)
537
538 - 截至 12:51 UTC,主下游进程仍然是:
539 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
540 - `evaluate.py` 仍未出现。
541 - `smoke-local` 主进程仍在:
542 - `PID=311494``external_adapters.py smoke-local fma ...`
543 - 索引目录仍只有目录本身:
544 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
545 - 截至该时点,仍未观测到新的索引产物文件。
546 - manifest 复核仍通过:
547 - `ok=true`
548 - `catalog_references=8000`
549 - `train_queries=6401`
550 - `test_queries=1593`
551 - `val_queries=0`
552
553 这说明:
554 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
555 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
556
557 ### build-index 12:55 UTC 延续证据(2026-06-02)
558
559 - 截至 12:55 UTC,主下游进程仍然是:
560 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
561 - `evaluate.py` 仍未出现。
562 - `smoke-local` 主进程仍在:
563 - `PID=311494``external_adapters.py smoke-local fma ...`
564 - 索引目录仍只有目录本身:
565 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
566 - 截至该时点,仍未观测到新的索引产物文件。
567 - manifest 复核仍通过:
568 - `ok=true`
569 - `catalog_references=8000`
570 - `train_queries=6401`
571 - `test_queries=1593`
572 - `val_queries=0`
573
574 这说明:
575 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
576 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
577
578 ### build-index 12:59 UTC 延续证据(2026-06-02)
579
580 - 截至 12:59 UTC,主下游进程仍然是:
581 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
582 - `evaluate.py` 仍未出现。
583 - `smoke-local` 主进程仍在:
584 - `PID=311494``external_adapters.py smoke-local fma ...`
585 - 索引目录仍只有目录本身:
586 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
587 - 截至该时点,仍未观测到新的索引产物文件。
588 - manifest 复核仍通过:
589 - `ok=true`
590 - `catalog_references=8000`
591 - `train_queries=6401`
592 - `test_queries=1593`
593 - `val_queries=0`
594
595 这说明:
596 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
597 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
598
599 ### build-index 13:04 UTC 延续证据(2026-06-02)
600
601 - 截至 13:04 UTC,主下游进程仍然是:
602 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
603 - `evaluate.py` 仍未出现。
604 - `smoke-local` 主进程仍在:
605 - `PID=311494``external_adapters.py smoke-local fma ...`
606 - 索引目录仍只有目录本身:
607 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
608 - 截至该时点,仍未观测到新的索引产物文件。
609 - manifest 复核仍通过:
610 - `ok=true`
611 - `catalog_references=8000`
612 - `train_queries=6401`
613 - `test_queries=1593`
614 - `val_queries=0`
615
616 这说明:
617 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
618 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
619
620 ### build-index 13:10 UTC 延续证据(2026-06-02)
621
622 - 截至 13:10 UTC,主下游进程仍然是:
623 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
624 - `evaluate.py` 仍未出现。
625 - `smoke-local` 主进程仍在:
626 - `PID=311494``external_adapters.py smoke-local fma ...`
627 - 索引目录仍只有目录本身:
628 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
629 - 截至该时点,仍未观测到新的索引产物文件。
630 - manifest 复核仍通过:
631 - `ok=true`
632 - `catalog_references=8000`
633 - `train_queries=6401`
634 - `test_queries=1593`
635 - `val_queries=0`
636
637 这说明:
638 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
639 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
640
641 ### build-index 13:16 UTC 延续证据(2026-06-02)
642
643 - 截至 13:16 UTC,主下游进程仍然是:
644 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
645 - `evaluate.py` 仍未出现。
646 - `smoke-local` 主进程仍在:
647 - `PID=311494``external_adapters.py smoke-local fma ...`
648 - 索引目录仍只有目录本身:
649 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
650 - 截至该时点,仍未观测到新的索引产物文件。
651 - manifest 复核仍通过:
652 - `ok=true`
653 - `catalog_references=8000`
654 - `train_queries=6401`
655 - `test_queries=1593`
656 - `val_queries=0`
657
658 这说明:
659 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
660 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
661
662 ### build-index 13:22 UTC 延续证据(2026-06-02)
663
664 - 截至 13:22 UTC,主下游进程仍然是:
665 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
666 - `evaluate.py` 仍未出现。
667 - `smoke-local` 主进程仍在:
668 - `PID=311494``external_adapters.py smoke-local fma ...`
669 - 索引目录仍只有目录本身:
670 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
671 - 截至该时点,仍未观测到新的索引产物文件。
672 - manifest 复核仍通过:
673 - `ok=true`
674 - `catalog_references=8000`
675 - `train_queries=6401`
676 - `test_queries=1593`
677 - `val_queries=0`
678
679 这说明:
680 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
681 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
682
683 ### build-index 13:28 UTC 延续证据(2026-06-02)
684
685 - 截至 13:28 UTC,主下游进程仍然是:
686 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
687 - `evaluate.py` 仍未出现。
688 - `smoke-local` 主进程仍在:
689 - `PID=311494``external_adapters.py smoke-local fma ...`
690 - 索引目录仍只有目录本身:
691 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
692 - 截至该时点,仍未观测到新的索引产物文件。
693 - manifest 复核仍通过:
694 - `ok=true`
695 - `catalog_references=8000`
696 - `train_queries=6401`
697 - `test_queries=1593`
698 - `val_queries=0`
699
700 这说明:
701 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
702 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
703
704 ### build-index 13:34 UTC 延续证据(2026-06-02)
705
706 - 截至 13:34 UTC,主下游进程仍然是:
707 - `PID=424691``run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
708 - `evaluate.py` 仍未出现。
709 - `smoke-local` 主进程仍在:
710 - `PID=311494``external_adapters.py smoke-local fma ...`
711 - 索引目录仍只有目录本身:
712 - `/tmp/fma_real_smoke_stopcheck/fma_index_smoke/`
713 - 截至该时点,仍未观测到新的索引产物文件。
714 - manifest 复核仍通过:
715 - `ok=true`
716 - `catalog_references=8000`
717 - `train_queries=6401`
718 - `test_queries=1593`
719 - `val_queries=0`
720
721 这说明:
722 - 真实 FMA smoke 仍稳定停留在 `build-index` 阶段。
723 - 下一关键观察点依旧是“索引产物首次出现”或“切换到 `evaluate.py`”。
724
725 ### 重启后第一优先级动作
726
727 1. 先检查真实 FMA smoke 是否完成:
728 ```bash
729 ps -p 311629 -o pid,etime,%cpu,%mem,cmd
730 find /tmp/fma_real_smoke_stopcheck/fma_models_smoke -maxdepth 2 \( -type f -o -type d \) | sort
731 pgrep -af 'train.py --data /tmp/fma_real_smoke_stopcheck|run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck|evaluate.py --data /tmp/fma_real_smoke_stopcheck'
732 ```
733 2. 如果 smoke 完成:
734 - 收集 `report.json` / metrics / artifacts
735 - 回写 `docs/open-dataset-workflow.md`
736 - 回写 `docs/CHANGELOG.md`
737 - commit + push
738 3. 如果 smoke 仍在跑:
739 - 不要误判为空模型目录是 bug
740 - 继续等待 `Epoch 1` 结束或切换到 `build-index/evaluate`
741
742
743 ## 1. 项目是什么
744
745 这是一个面向**音乐片段识别 / 音乐检索**的 ACR 引擎,核心路线是:
746
747 - 指纹检索(Chromaprint-like)
748 - embedding 检索(ECAPA-derived)
749 - 可选 melody-aware 融合
750 - retrieval-first 评测与优化
751
752 它已经不是单纯的“分类模型训练脚本”,而是一个较完整的工程原型:
753 - 数据层
754 - 训练层
755 - 索引层
756 - 识别层
757 - 评测层
758 - 文档层
759 - 开放数据接入层
760 - 发布产物层
761
762 ---
763
764 ## 2. 你应该先看哪些文档
765
766 ### 核心 4 组入口
767 - [docs/README.md](./README.md)
768 - [docs/open-dataset-workflow.md](./open-dataset-workflow.md)
769 - [docs/dataset-spec.md](./dataset-spec.md)
770 - [docs/industrialization-roadmap.md](./industrialization-roadmap.md)
771
772 ### 如果你是算法/模型方向
773 - [docs/dataset-spec.md](./dataset-spec.md)
774 - [docs/sota-research-2026.md](./sota-research-2026.md)
775 - [docs/industrial-benchmark-spec.md](./industrial-benchmark-spec.md)
776
777 ### 如果你是数据接入方向
778 - [docs/open-dataset-workflow.md](./open-dataset-workflow.md)
779 - [docs/dataset-sources-and-licensing.md](./dataset-sources-and-licensing.md)
780 - [acr-engine/data/raw/README.md](../acr-engine/data/raw/README.md)
781
782 ### 如果你是工程/服务方向
783 - [docs/service-api.md](./service-api.md)
784 - [docs/CHANGELOG.md](./CHANGELOG.md)
785 9
786 --- 10 ---
787 11
788 ## 3. 当前代码结构重点 12 ## 一页结论
789
790 ### 训练与评测主入口
791 - [acr-engine/train.py](../acr-engine/train.py)
792 - [acr-engine/evaluate.py](../acr-engine/evaluate.py)
793 - [acr-engine/run_demo.py](../acr-engine/run_demo.py)
794
795 ### 数据层
796 - [acr-engine/src/data/dataset.py](../acr-engine/src/data/dataset.py)
797 - [acr-engine/src/data/synthetic.py](../acr-engine/src/data/synthetic.py)
798 - [acr-engine/src/data/manifest_tools.py](../acr-engine/src/data/manifest_tools.py)
799 - [acr-engine/src/data/external_adapters.py](../acr-engine/src/data/external_adapters.py)
800
801 ### 检索与模型层
802 - [acr-engine/src/engines/hybrid_engine.py](../acr-engine/src/engines/hybrid_engine.py)
803 - [acr-engine/src/engines/ecapa_embedder.py](../acr-engine/src/engines/ecapa_embedder.py)
804 - [acr-engine/src/engines/chromaprint_matcher.py](../acr-engine/src/engines/chromaprint_matcher.py)
805 - [acr-engine/src/models/ecapa_tdnn.py](../acr-engine/src/models/ecapa_tdnn.py)
806 - [acr-engine/src/models/losses.py](../acr-engine/src/models/losses.py)
807
808 ### 服务层
809 - [acr-engine/src/service/app.py](../acr-engine/src/service/app.py)
810
811 ---
812
813 ## 4. 已经完成的关键能力
814 13
815 ### 4.1 原型与 synthetic 数据 14 当前项目主线已经从“原型是否能跑通”切到:
816 - synthetic dataset 可生成
817 - `train.py --dry-run` 可通过
818 - 可训练出 checkpoint
819 - 可 build-index
820 - 可 recognize
821 - 可 evaluate
822 15
823 ### 4.2 开放数据接入 16 > **为版权保护场景建设一个可演进的音乐 ACR / 检索系统**,
824 已经具备以下命令: 17 > 目标是让 `100w` 音频、约 `30w` 歌曲能够在未来通过
18 > `canonical_song / work / recording / recording_asset / audio_window`
19 > 这条主数据链,以及 `model_registry / feature_set_registry`
20 > 这套模型注册机制,稳定支撑检索、归属、升级与回滚。
825 21
826 - `inspect-local` 22 当前已经完成的关键交付:
827 - `inspect-batch` 23 - 文档体系已重构为“角色化阅读路径”
828 - `prepare-local` 24 - SOTA 演进路径已明确:**Phase-1 先走 encoder-only**
829 - `validate-local` 25 - PostgreSQL 主数据与特征注册 DDL 已落地为推荐版 schema
830 - `smoke-local` 26 - Phase-1 实施 checklist 和 model/feature/reference set 初始化手册已补齐
831 27
832 这些都在: 28 当前最重要的下一步不是继续写方案,而是:
833 - [acr-engine/src/data/external_adapters.py](../acr-engine/src/data/external_adapters.py)
834 29
835 ### 4.3 文档与发布产物 30 1. **按 schema v2 落 PostgreSQL 主数据模型**
836 开放数据 smoke 也能生成: 31 2. **把 reference set / audio_window / feature_set 初始化做起来**
837 - benchmark report 32 3. **接入 MERT / MuQ 的 encoder-only 抽特征链**
838 - model card 33 4. **跑通 fingerprint lane + semantic lane 的第一版聚合闭环**
839 - release checklist
840 - artifact manifest
841 34
842 --- 35 ---
843 36
844 ## 5. 开放数据当前的实际工作方式 37 ## 下次启动先读什么
845 38
846 ### 真实音频应该放到哪里 39 ### 最短阅读顺序(推荐)
847 - [acr-engine/data/raw/fma_small_audio/](../acr-engine/data/raw/fma_small_audio/) 40 1. [docs/README.md](./README.md)
848 - [acr-engine/data/raw/mtg_jamendo_audio/](../acr-engine/data/raw/mtg_jamendo_audio/) 41 2. [docs/acr-architecture.md](./acr-architecture.md)
849 42 3. [docs/sota-evolution-guide.md](./sota-evolution-guide.md)
850 说明文件: 43 4. [docs/postgresql-data-model.md](./postgresql-data-model.md)
851 - [acr-engine/data/raw/README.md](../acr-engine/data/raw/README.md) 44 5. [docs/phase1-implementation-checklist.md](./phase1-implementation-checklist.md)
852 45 6. [docs/model-feature-registry-bootstrap.md](./model-feature-registry-bootstrap.md)
853 ### 当前最推荐的命令 46 7. [docs/CHANGELOG.md](./CHANGELOG.md)
854
855 #### FMA
856 ```bash
857 /usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local fma data/raw/fma_small_audio --output-root data/external_smoke --eval-ratio 0.2 --query-duration 8.0 --train-epochs 1 --batch-size 2
858 ```
859
860 #### MTG-Jamendo
861 ```bash
862 /usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local mtg_jamendo data/raw/mtg_jamendo_audio --output-root data/external_smoke --eval-ratio 0.2 --query-duration 8.0 --train-epochs 1 --batch-size 2
863 ```
864 47
865 ### 当前 smoke-local 已验证能力 48 如果只想快速恢复上下文,至少读前 5 个。
866 `smoke-local` 会自动跑:
867 1. inspect-local
868 2. prepare-local
869 3. validate-local
870 4. train
871 5. build-index
872 6. evaluate
873 7. generate_artifacts
874 49
875 --- 50 ---
876 51
877 ## 6. 目前最重要的验证证据 52 ## 当前稳定结论(可以直接继承)
878
879 ### 6.1 synthetic-as-open-fixed(开放数据 stand-in)
880 已成功验证:
881 - `prepare-local`
882 - `validate-local`
883 - `train.py`
884 - `build-index`
885 - `evaluate.py`
886 - `generate_artifacts.py`
887 53
888 关键结果: 54 ### 1. 技术方向
889 - `num_queries=8` 55 - **当前 ECAPA 路线保留为 baseline,不再作为长期主底座。**
890 - `top1=1.0` 56 - **Phase-1 主推 encoder-only foundation 路线。**
891 - `topk=1.0` 57 - exact lane:`Chromaprint`
58 - semantic lane 主 baseline:`MERT-v1-95M`
59 - semantic lane challenger:`MuQ`
60 - **Phase-2 才考虑 version / cover lane。**
61 - **Phase-3 再进入工业化检索/重排/治理。**
892 62
893 相关目录: 63 ### 2. 数据主链
894 - [acr-engine/data/external_ingested/synthetic_as_open_fixed/](../acr-engine/data/external_ingested/synthetic_as_open_fixed/) 64 后续主数据一律围绕:
895 - [acr-engine/reports/open-smoke-fixed/fma/](../acr-engine/reports/open-smoke-fixed/fma/)
896 65
897 ### 6.2 一键 smoke-local 66 ```text
898 已验证: 67 canonical_song -> work -> recording -> recording_asset -> audio_window
899 ```bash
900 /usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local fma data/synthetic_v2/songs --output-root data/external_smoke --eval-ratio 0.2 --query-duration 5.0 --train-epochs 1 --batch-size 2
901 ``` 68 ```
902 69
903 关键结果: 70 不要再退回到仅有 `song_id` 的扁平结构。
904 - `num_audio_files=24`
905 - `catalog=24`
906 - `train_queries=16`
907 - `test_queries=8`
908 - `top1=1.0`
909 - `topk=1.0`
910
911 相关目录:
912 - [acr-engine/data/external_smoke/](../acr-engine/data/external_smoke/)
913
914 ---
915
916 ## 0. 当前交付状态(本次 checkpoint)
917
918 ### 已可交付
919 - 文档体系、数据规范、切片策略、评测公平性控制已成型。
920 - 新 session 已可依据本文件和 `AGENT.md` 继续推进。
921 71
922 ### 当前卡点 72 ### 3. 模型/特征主链
923 - `cap48 top2 seed=999` 已完成,三 seed aggregate 已可计算。 73 后续 encoder、feature、索引一律围绕:
924 - 工作区存在大量数据与模型产物,当前只建议精确提交文档文件。
925 74
926 ## 0.5 当前 bucket/style-aware 基线结论 75 ```text
927 76 model_registry -> feature_set_registry -> audio_embedding / audio_fingerprint -> retrieval_index_registry
928 完整 bucket 汇总已完成:
929 - 汇总文件:`/tmp/ab_smoke_bucketed_smoke/report.json`
930 - `prefix_000_a`:winner=`hybrid`
931 - `prefix_000_b`:winner=`high_energy`
932 - aggregate:
933 - `hybrid``mean_top1=1.0, mean_topk=1.0, mean_num_queries=4.0`
934 - `high_energy``mean_top1=1.0, mean_topk=1.0, mean_num_queries=3.5`
935
936 当前解释:
937 - toy bucket 已经足够证明“不同子集可出现不同 winner”。
938 - 但它仍不是业务语义 bucket,因此只能作为方法学基线,不能当成最终产品结论。
939
940 ### 最新验证证据(2026-06-02 18:21 UTC 左右)
941 - `hybrid` 的 reference index 已完成:
942 - `refs_done=48 / refs_total=48`
943 - `windows_done=491`
944 - `embedding_shape=[491, 192]`
945 - `elapsed_sec=80.26`
946 - 对应文件已写出:
947 - `/tmp/ab_smoke_seg_cap48_top2_seed999/hybrid/fma_index_smoke/reference_embs.npy`
948 - `/tmp/ab_smoke_seg_cap48_top2_seed999/hybrid/fma_index_smoke/reference_ids.npy`
949 - `/tmp/ab_smoke_seg_cap48_top2_seed999/hybrid/fma_index_smoke/reference_progress.json`
950 - 进程树已确认进入:
951 - `evaluate.py --data /tmp/ab_smoke_seg_cap48_top2_seed999/hybrid/fma/manifests ... --output-json /tmp/ab_smoke_seg_cap48_top2_seed999/hybrid/fma_reports_smoke/eval.json --seed 999 --max-queries 24`
952 - 最终结果(seed=999):
953 - `hybrid``num_queries=24, top1=0.875, topk=1.0`
954 - `high_energy``num_queries=24, top1=0.9167, topk=1.0`
955 - winner:`high_energy`
956 - 三 seed aggregate(cap48):
957 - `high_energy``mean_top1=0.9167, min=0.9167, max=0.9167, stdev=0.0`
958 - `hybrid``mean_top1=0.8750, min=0.7917, max=0.9583, stdev=0.0680`
959
960 ### 文档入口最新状态
961 - `docs/README.md` 已补齐业务数据接入导航与最短链说明。
962 - `docs/README.md` 已新增“新 session 最短阅读顺序”。
963 - `docs/README.md` 已新增“新 session 最短可跑命令”。
964 - `AGENT.md` 已同步最短可跑命令。
965 - 已把本地 smoke 临时文件加入 `.gitignore`
966 - 已补充 Python 缓存噪音忽略规则。
967
968 ## 第一条可跑命令(重启后先验证)
969
970 ```bash
971 cd /workspace/acr-engine
972 /usr/local/miniconda3/bin/python scripts/business_export_offline_smoke.py \
973 --output-root /tmp/business_export_offline_smoke
974 ``` 77 ```
975 78
976 预期 79 不要设计成固定列
977 - 业务导出离线链跑通 80 - `mert_embedding`
978 - 项目 `catalog/train/test/val` 成功生成 81 - `muq_embedding`
979 - `train.py --dry-run` 通过 82 - `ecapa_embedding`
980 83
981 ### 最优先待办 84 ### 4. reference 集合
982 1. 把已完成的 toy bucket baseline 升级为语义 bucket(风格 / 结构 / hard-case)。 85 当前结论是:
983 - 模板:`acr-engine/configs/buckets/fma_semantic_bucket_template.json` 86 - 需要显式 `reference_set_registry`
984 - 业务型素材优先看:[business-music-bucket-and-type-guide.md](./business-music-bucket-and-type-guide.md) 87 - `is_reference=true` 仍然保留,但不再足够表达生产切换
985 - Manifest/角色映射看:[business-manifest-and-type-role-spec.md](./business-manifest-and-type-role-spec.md) 88 - 未来热 reference 集、A/B、回滚、encoder 升级都要依赖 reference set 版本化
986 - SQL/CSV/JSONL 导出参考:[business-export-cookbook.md](./business-export-cookbook.md)
987 - 规范化脚本:`acr-engine/scripts/normalize_business_export.py`
988 - 角色拆分脚本:`acr-engine/scripts/split_business_manifest_ready.py`
989 - 项目 manifest 适配:`acr-engine/scripts/build_business_project_manifests.py`
990 2. 对比 cap48 与 cap64 的不一致现象,补充分规模结论。
991 3. 继续补 cap64 multi-seed,而不是只保留单 seed。
992 4. 继续优化 `hybrid`,重点降低波动并提升 hard case 稳定性。
993 5. 在 bucket 基线下继续提交与推送。
994
995 ### 续跑时不要做的事
996 - 不要 `git add .`
997 - 不要提交 `data/raw``data/external_smoke``/tmp``__pycache__`、模型与索引产物
998
999 ## 7. 当前最重要的待办
1000
1001 ### 优先级 A:真实开放数据替换
1002 目标:
1003 - 用真实本地 FMA / MTG-Jamendo 音频替换 synthetic stand-in
1004
1005 操作:
1006 1. 把真实音频放进:
1007 - `acr-engine/data/raw/fma_small_audio/`
1008 -`acr-engine/data/raw/mtg_jamendo_audio/`
1009 2. 直接运行 `smoke-local`
1010 3. 记录:
1011 - inspect 规模
1012 - train/test query 数
1013 - top1/topk
1014 - artifact bundle
1015
1016 ### 优先级 B:hard-case 精度继续优化
1017 当前历史结论:
1018 - naive oversampling:失败
1019 - type-aware weighting:部分有效
1020 - sample-level weighting:提升 `confused`
1021 - retrieval fusion tuning:更稳定有效
1022
1023 下阶段重点:
1024 - `confused`
1025 - `humming_like`
1026 - 真实开放数据上的 hard-case bucket
1027
1028 ### 优先级 C:foundation model / SOTA baseline
1029 已经在文档中记录:
1030 - MERT
1031 - MuQ
1032 - 更强 retrieval-first 路线
1033
1034 后续可以做:
1035 - frozen backbone baseline
1036 - adapter fine-tune
1037 89
1038 --- 90 ---
1039 91
1040 ## 8. 最新关键提交(便于新 session 快速定位) 92 ## 本轮新增/修改的关键文件
1041
1042 近几次关键提交建议优先看:
1043
1044 - `6232787` Make segmentation strategy benchmarks comparable under fixed query budgets
1045 - `f04a314` Benchmark real FMA segmentation strategies on a capped smoke subset
1046 - `d7a0894` Favor beat-aligned candidate segments for music ACR training/query generation
1047 - `b6cdf66` Add high-energy and onset-aware music segment selection
1048 - `d221852` Add explicit drop zones for real open-music corpora
1049 - `eee15ac` Automate the full open-dataset smoke workflow behind one command
1050 - `8795907` Generate release artifacts for the open-dataset smoke path
1051 - `dc9ef1b` Close the open-dataset smoke loop through evaluation
1052
1053 ---
1054
1055 ## 9. 最新真实数据切片 benchmark 状态(重启后优先续跑这里)
1056
1057 ### 已完成的最新事实
1058
1059 当前项目已经不是“只有 random 切片”:
1060
1061 - 训练/外部 query 生成支持:
1062 - `random`
1063 - `silence_aware`
1064 - `high_energy`
1065 - `onset_aware`
1066 - `beat_aware`
1067 - `repeated_section_aware`
1068 - `hybrid`
1069 - 已接入的 `librosa` 逻辑:
1070 - `effects.split`
1071 - `onset.onset_detect`
1072 - `beat.beat_track`
1073 - `feature.chroma_cqt`
1074
1075 ### 已完成的小规模 capped 验证
1076
1077 命令:
1078
1079 ```bash
1080 cd /workspace/acr-engine
1081 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \
1082 --dataset fma \
1083 --input-dir data/raw/fma_small_audio \
1084 --work-root /tmp/ab_smoke_cap \
1085 --subset-size 6 \
1086 --query-duration 8 \
1087 --train-epochs 1 \
1088 --batch-size 2 \
1089 --device cpu \
1090 --strategies hybrid \
1091 --max-test-queries 5 \
1092 --output-json /tmp/ab_smoke_cap/report.json
1093 ```
1094
1095 结果:
1096 - `max_test_queries = 5`
1097 - `num_queries = 5`
1098 - `top1 = 1.0`
1099 - `topk = 1.0`
1100
1101 ### 正在进行的中规模 capped FMA benchmark
1102
1103 命令:
1104
1105 ```bash
1106 cd /workspace/acr-engine
1107 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \
1108 --dataset fma \
1109 --input-dir data/raw/fma_small_audio \
1110 --work-root /tmp/ab_smoke_seg_cap16 \
1111 --subset-size 16 \
1112 --query-duration 8 \
1113 --train-epochs 1 \
1114 --batch-size 2 \
1115 --device cpu \
1116 --strategies hybrid beat_aware high_energy repeated_section_aware \
1117 --max-test-queries 12 \
1118 --output-json /tmp/ab_smoke_seg_cap16/report.json
1119 ```
1120
1121 在本次交接时,cap16 已完成,最终结果如下:
1122
1123 | 策略 | num_queries | top1 | topk | 状态 |
1124 |---|---:|---:|---:|---|
1125 | `hybrid` | 12 | 1.0 | 1.0 | 已完成 |
1126 | `high_energy` | 12 | 1.0 | 1.0 | 已完成 |
1127 | `beat_aware` | 12 | 0.9167 | 1.0 | 已完成 |
1128 | `repeated_section_aware` | 12 | 0.8333 | 1.0 | 已完成 |
1129
1130 ### 重启后第一优先动作
1131 93
1132 1. 先检查: 94 ### 主文档
1133 95 - [docs/README.md](./README.md)
1134 ```bash 96 - [docs/acr-architecture.md](./acr-architecture.md)
1135 pgrep -af 'ab_smoke_seg_cap16|external_adapters.py smoke-local fma /tmp/ab_smoke_seg_cap16|evaluate.py --data /tmp/ab_smoke_seg_cap16|run_demo.py build-index --data /tmp/ab_smoke_seg_cap16' 97 - [docs/sota-evolution-guide.md](./sota-evolution-guide.md)
1136 ``` 98 - [docs/postgresql-data-model.md](./postgresql-data-model.md)
1137 99 - [docs/phase1-implementation-checklist.md](./phase1-implementation-checklist.md)
1138 2. 如果 `report.json` 已存在,优先读取并同步文档 100 - [docs/model-feature-registry-bootstrap.md](./model-feature-registry-bootstrap.md)
1139 3. 如果中断:
1140 - 保留已有 `/tmp/ab_smoke_seg_cap16/*` 结果作人工记录
1141 - 重新跑缺失策略,或单独跑:
1142 101
1143 ```bash 102 ### SQL / schema
1144 cd /workspace/acr-engine 103 - `acr-engine/sql/acr_pg_schema_v2.sql`
1145 /usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local \
1146 fma /tmp/ab_smoke_seg_cap16/subset_audio \
1147 --output-root /tmp/ab_smoke_seg_cap16/high_energy \
1148 --eval-ratio 0.2 \
1149 --query-duration 8.0 \
1150 --query-strategy high_energy \
1151 --segment-strategy high_energy \
1152 --train-epochs 1 \
1153 --batch-size 2 \
1154 --device cpu \
1155 --max-test-queries 12 \
1156 --seed 42
1157 ```
1158 104
1159 4. 当前这轮 cap16 的最终建议已经形成: 105 ### 历史/补充说明(仍有参考价值)
1160 - 默认优先:`hybrid` 106 - [docs/sota-research-2026.md](./sota-research-2026.md)
1161 - 强次选:`high_energy` 107 - [docs/production-encoder-freeze-and-embedding-strategy.md](./production-encoder-freeze-and-embedding-strategy.md)
1162 - `beat_aware` / `repeated_section_aware` 更适合作为补充对照,而不是默认策略 108 - [docs/training-data-and-pgvector-guide.md](./training-data-and-pgvector-guide.md)
1163 109
1164 --- 110 ---
1165 111
1166 ## 10. cap24 top2 对照实验(进行中) 112 ## 当前推荐的启动动作
1167
1168 为进一步判断 `hybrid``high_energy` 的并列关系,已经启动更大的真实 FMA 对照:
1169
1170 ```bash
1171 cd /workspace/acr-engine
1172 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \
1173 --dataset fma \
1174 --input-dir data/raw/fma_small_audio \
1175 --work-root /tmp/ab_smoke_seg_cap24_top2 \
1176 --subset-size 24 \
1177 --query-duration 8 \
1178 --train-epochs 1 \
1179 --batch-size 2 \
1180 --device cpu \
1181 --strategies hybrid high_energy \
1182 --max-test-queries 16 \
1183 --output-json /tmp/ab_smoke_seg_cap24_top2/report.json
1184 ```
1185
1186 当前 fresh evidence:
1187
1188 | 策略 | subset | max_test_queries | top1 | topk | 状态 |
1189 |---|---:|---:|---:|---:|---|
1190 | `hybrid` | 24 | 16 | 1.0 | 1.0 | 已完成 |
1191 | `high_energy` | 24 | 16 | 0.8125 | 1.0 | 已完成 |
1192 113
1193 恢复检查命令: 114 ## 路线 A:如果下次 session 继续“补文档/补设计”
115 优先顺序:
116 1.**数据导入手册**:100w 音频如何映射到 `canonical_song/work/recording/recording_asset`
117 2.**检索聚合设计文档**:fingerprint lane + semantic lane 的分数融合与 song/work 聚合规则
118 3.**索引与版本治理文档**:reference set / feature set / index set 的上线切换规则
1194 119
1195 ```bash 120 ## 路线 B:如果下次 session 开始“进入实现”
1196 pgrep -af 'ab_smoke_seg_cap24_top2|external_adapters.py smoke-local fma /tmp/ab_smoke_seg_cap24_top2|evaluate.py --data /tmp/ab_smoke_seg_cap24_top2|run_demo.py build-index --data /tmp/ab_smoke_seg_cap24_top2' 121 直接按下面顺序推进:
1197 ``` 122 1. 建库执行 `acr-engine/sql/acr_pg_schema_v2.sql`
1198 123 2. 初始化 `canonical_song / work / recording / recording_asset`
1199 cap24 top2 最终结论: 124 3. 初始化 `reference_set_registry`
1200 - `hybrid``16 / 1.0 / 1.0` 125 4. 生成 `audio_window`
1201 - `high_energy``16 / 0.8125 / 1.0` 126 5. 初始化 `model_registry / feature_set_registry`
1202 - 这个结果比 cap16 更能说明问题:**当前默认策略应明确固定为 `hybrid`** 127 6. 接入 MERT / MuQ encoder-only 抽特征
128 7. 构建 semantic index
129 8. 跑通 query -> candidate -> canonical_song 闭环
1203 130
1204 --- 131 ---
1205 132
1206 ## 11. cap32 top2 对照实验(已完成) 133 ## 下次 session 第一条可直接复制执行的检查命令
1207
1208 为了确认 cap24 的结论不是偶然,已继续启动更大的真实 FMA top2 对照:
1209 134
1210 ```bash 135 ```bash
1211 cd /workspace/acr-engine 136 cd /workspace
1212 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \ 137 sed -n '1,220p' docs/README.md
1213 --dataset fma \ 138 sed -n '1,260p' docs/phase1-implementation-checklist.md
1214 --input-dir data/raw/fma_small_audio \ 139 sed -n '1,260p' docs/model-feature-registry-bootstrap.md
1215 --work-root /tmp/ab_smoke_seg_cap32_top2 \ 140 sed -n '1,260p' docs/postgresql-data-model.md
1216 --subset-size 32 \
1217 --query-duration 8 \
1218 --train-epochs 1 \
1219 --batch-size 2 \
1220 --device cpu \
1221 --strategies hybrid high_energy \
1222 --max-test-queries 20 \
1223 --output-json /tmp/ab_smoke_seg_cap32_top2/report.json
1224 ``` 141 ```
1225 142
1226 最终结果: 143 如果要直接看 schema:
1227
1228 | 项目 | 状态 |
1229 |---|---|
1230 | `subset_size` | `32` |
1231 | `max_test_queries` | `20` |
1232 | `hybrid` | `num_queries=20`, `top1=0.95`, `topk=1.0` |
1233 | `high_energy` | `num_queries=20`, `top1=0.5`, `topk=1.0` |
1234 | `report.json` | 已生成 |
1235
1236 恢复检查命令:
1237 144
1238 ```bash 145 ```bash
1239 pgrep -af 'ab_smoke_seg_cap32_top2|external_adapters.py smoke-local fma /tmp/ab_smoke_seg_cap32_top2|evaluate.py --data /tmp/ab_smoke_seg_cap32_top2|run_demo.py build-index --data /tmp/ab_smoke_seg_cap32_top2|train.py --data /tmp/ab_smoke_seg_cap32_top2' 146 cd /workspace
147 sed -n '1,320p' acr-engine/sql/acr_pg_schema_v2.sql
1240 ``` 148 ```
1241 149
1242 cap32 top2 最终结论:
1243 - `hybrid``20 / 0.95 / 1.0`
1244 - `high_energy``20 / 0.5 / 1.0`
1245 - cap24 与 cap32 两轮更大真实子集都指向同一结论:**默认策略固定为 `hybrid`**
1246
1247 --- 150 ---
1248 151
1249 ## 12. cap48 top2 对照实验(已完成) 152 ## 当前实现与未来实现的边界
1250 153
1251 为继续扩展真实数据证据链,已启动更大的 FMA top2 对照: 154 ### 当前仓库已经有的东西
155 - `Chromaprint` 原型链
156 - `ECAPA` embedding baseline
157 - hybrid engine 原型
158 - 早期 pgvector prototype schema
1252 159
1253 ```bash 160 ### 当前还没做完的东西
1254 cd /workspace/acr-engine 161 - PostgreSQL v2 schema 的实际落库
1255 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \ 162 - Phase-1 的 reference set 初始化
1256 --dataset fma \ 163 - MERT / MuQ encoder-only 特征抽取与入库
1257 --input-dir data/raw/fma_small_audio \ 164 - semantic lane 的第一版 production-oriented 聚合
1258 --work-root /tmp/ab_smoke_seg_cap48_top2 \
1259 --subset-size 48 \
1260 --query-duration 8 \
1261 --train-epochs 1 \
1262 --batch-size 2 \
1263 --device cpu \
1264 --strategies hybrid high_energy \
1265 --max-test-queries 24 \
1266 --output-json /tmp/ab_smoke_seg_cap48_top2/report.json
1267 ```
1268
1269 最终结果:
1270 165
1271 | 项目 | 状态 | 166 所以:
1272 |---|---|
1273 | `subset_size` | `48` |
1274 | `max_test_queries` | `24` |
1275 | `high_energy` | `num_queries=24`, `top1=0.9167`, `topk=1.0` |
1276 | `hybrid` | `num_queries=24`, `top1=0.7917`, `topk=1.0` |
1277 | `report.json` | 已生成 |
1278 167
1279 恢复检查命令: 168 > 当前项目的“方案层”已经足够启动实现,
1280 169 > 下次 session 不应再从头讨论“要不要 song/work/recording”,
1281 ```bash 170 > 而应该直接进入 **Schema -> Reference Set -> Feature Set -> Extraction -> Retrieval** 的执行链。
1282 pgrep -af 'ab_smoke_seg_cap48_top2|external_adapters.py smoke-local fma /tmp/ab_smoke_seg_cap48_top2|evaluate.py --data /tmp/ab_smoke_seg_cap48_top2|run_demo.py build-index --data /tmp/ab_smoke_seg_cap48_top2|train.py --data /tmp/ab_smoke_seg_cap48_top2'
1283 ```
1284
1285 cap48 top2 最终结论:
1286 - `high_energy``24 / 0.9167 / 1.0`
1287 - `hybrid``24 / 0.7917 / 1.0`
1288 - 这轮结果与 cap24 / cap32 不一致,说明当前默认策略结论**还不能视为彻底封板**
1289 - 下一步应优先做:
1290 1. 更大 subset(如 64+)
1291 2. 多 seed 复跑
1292 3. style-aware bucket benchmark
1293 171
1294 --- 172 ---
1295 173
1296 ## 13. cap48 top2 第二个 seed(已完成) 174 ## 当前验证状态
1297
1298 为验证 cap48 的“high_energy 反超”是否稳定,已启动第二个 seed:
1299 175
1300 ```bash 176 ### 已验证
1301 cd /workspace/acr-engine 177 - 新文档结构已补齐并接入 README
1302 /usr/local/miniconda3/bin/python scripts/ab_smoke_segmentation.py \ 178 - Phase-1 方案、PostgreSQL 设计、实施 checklist、registry bootstrap 均已提交
1303 --dataset fma \ 179 - architect 审核结论:**APPROVED**
1304 --input-dir data/raw/fma_small_audio \ 180 - 代码已推送远端
1305 --work-root /tmp/ab_smoke_seg_cap48_top2_seed123 \
1306 --subset-size 48 \
1307 --query-duration 8 \
1308 --train-epochs 1 \
1309 --batch-size 2 \
1310 --device cpu \
1311 --strategies hybrid high_energy \
1312 --max-test-queries 24 \
1313 --seed 123 \
1314 --output-json /tmp/ab_smoke_seg_cap48_top2_seed123/report.json
1315 ```
1316
1317 最终结果:
1318
1319 | 项目 | 状态 |
1320 |---|---|
1321 | `subset_size` | `48` |
1322 | `max_test_queries` | `24` |
1323 | `seed` | `123` |
1324 | `hybrid` | `num_queries=24`, `top1=0.9583`, `topk=1.0` |
1325 | `high_energy` | `num_queries=24`, `top1=0.9167`, `topk=1.0` |
1326 | `report.json` | 已生成 |
1327 181
1328 seed123 最终结论: 182 ### 未验证 / 仍是缺口
1329 - `hybrid``24 / 0.9583 / 1.0` 183 - **未执行 live PostgreSQL apply**(当前环境缺少 `psql`
1330 - `high_energy``24 / 0.9167 / 1.0` 184 - **未实际跑 MERT / MuQ encoder-only 特征抽取**
1331 - cap48 至少已经表现出明显的 **seed 敏感性** 185 - **未落 reference set 的真实业务数据**
1332 - 因此当前默认策略的判断应基于 **多 seed 聚合**,而不是单次 cap48 反转 186 - **未定义最终线上分数融合细则**
1333 187
1334 ### cap48 两次 seed 的当前聚合结论 188 因此下次 session 应优先从这些未验证缺口里挑一条推进,而不是重复写总方案。
1335
1336 | 策略 | runs | mean_top1 | min_top1 | max_top1 | stdev_top1 |
1337 |---|---:|---:|---:|---:|---:|
1338 | `high_energy` | 2 | 0.9167 | 0.9167 | 0.9167 | 0.0 |
1339 | `hybrid` | 2 | 0.8750 | 0.7917 | 0.9583 | 0.0833 |
1340
1341 当前最稳妥的解释:
1342 - `high_energy` 在 cap48 两次 seed 上的**均值暂时领先**
1343 - `hybrid` 结果波动更大,但单轮峰值更高
1344 - 后续默认策略不应只看某一次单跑,而应继续累计 seed / style bucket 的聚合结果
1345 - `b766c74` Make open-dataset manifests trainable end to end
1346 - `fa23144` Add a single-page open dataset workflow for training prep
1347 - `af33be3` Condense docs and add manifest validation before training
1348
1349 这些 commit 基本覆盖了当前开放数据与文档演进主线。
1350 189
1351 --- 190 ---
1352 191
1353 ## 9. 新 session 接手时的推荐动作 192 ## 最近相关提交
1354
1355 如果你是新的 session,建议顺序:
1356
1357 1. 读:
1358 - [docs/README.md](./README.md)
1359 - [docs/open-dataset-workflow.md](./open-dataset-workflow.md)
1360 - [docs/session-handoff.md](./session-handoff.md)
1361 - [docs/current-capability-map.md](./current-capability-map.md)
1362 - [docs/training-data-and-pgvector-guide.md](./training-data-and-pgvector-guide.md)
1363 - [acr-engine/FIRST_RUN_CHECKLIST.md](../acr-engine/FIRST_RUN_CHECKLIST.md)
1364 - FMA 真实子集下载脚手架已存在:[acr-engine/scripts/fetch_fma_subset.py](../acr-engine/scripts/fetch_fma_subset.py);最近验证结果是旧直链 `403`、页面级历史 URL `404`;但 `https://modelscope.cn/datasets/pengzhendong/fma/resolve/master/fma_small.zip` 已验证 `200 OK` 且支持 range
1365 - 运行 [acr-engine/scripts/status_snapshot.py](../acr-engine/scripts/status_snapshot.py)
1366 - 或直接查看最新落盘快照:`acr-engine/.omx/latest_status_snapshot.json`
1367
1368 2. 检查真实数据是否已落位:
1369 - `acr-engine/data/raw/fma_small_audio/`
1370 - `acr-engine/data/raw/mtg_jamendo_audio/`
1371
1372 3. 如果已有真实音频:
1373 - 直接跑 `smoke-local`
1374
1375 4. 如果还没有真实音频:
1376 - 继续优化 synthetic-as-open-fixed
1377 - 或继续补开放数据下载/清洗自动化
1378
1379 5. 每完成一个阶段:
1380 - 更新 [docs/CHANGELOG.md](./CHANGELOG.md)
1381 - `git commit`
1382 - `git push`
1383
1384 ---
1385 193
1386 ## 10. 注意事项 194 按当前 handoff 相关主线,最近重要提交是:
195 - `a549d1d` — Clarify the ACR evolution path and freeze a production-grade data model
196 - `e514a6c` — Keep the new ACR architecture guide clean for follow-up edits
197 - `4b23f54` — Make the Phase-1 ACR plan executable for each delivery role
1387 198
1388 - 这个仓库里存在已跟踪的 `__pycache__` 文件;提交时要小心不要让它们污染变更。 199 如果下次需要追踪文档补充点,可以从这三个提交开始看。
1389 - 当前最稳定的改进方向不是盲目调训练权重,而是:
1390 - retrieval-time fusion
1391 - 更真实开放数据
1392 - 更真实评测
1393 - 开放数据布局现在依赖“自包含输出根”:
1394 - `audio/`
1395 - `manifests/`
1396 这一点后续不要破坏。
1397 200
1398 --- 201 ---
1399 202
1400 ## Sources 203 ## 一句话交接
1401 - [README.md](./README.md)
1402 - [open-dataset-workflow.md](./open-dataset-workflow.md)
1403 - [CHANGELOG.md](./CHANGELOG.md)
1404
1405 - FMA 下载完成后可直接执行:[acr-engine/scripts/fma_postdownload_ready.py](../acr-engine/scripts/fma_postdownload_ready.py)
1406
1407 - 若需要等待下载完成并自动切到解压/就绪检查,可直接执行:[acr-engine/scripts/wait_for_fma_and_prepare.py](../acr-engine/scripts/wait_for_fma_and_prepare.py)
1408
1409 ## 99. 本次 checkpoint 的明确结论
1410
1411 - `hybrid` 的 seed=999 评测结果已先行落盘:`top1=0.875, topk=1.0, num_queries=24`
1412 - 本次已经完成“交接可续跑化”交付。
1413 - 本次没有等待 `seed=999` 长时 CPU benchmark 完成,因此算法默认策略不做新结论跳变。
1414 - 当前最新稳妥表述仍然是:
1415 - `high_energy` 在已知两轮 cap48 aggregate 中更稳
1416 - `hybrid` 上限更高但波动更大
1417 - 最终默认策略要看更多 seed 聚合结果
1418
1419
1420 ## 100. 新一轮验证已启动:cap64
1421
1422 - 已启动:`/tmp/ab_smoke_seg_cap64_top2`
1423 - 配置:`subset_size=64`, `max_test_queries=32`, `seed=42`
1424 - 当前最新证据:
1425 - cap64 已完成:
1426 - `hybrid``num_queries=32, top1=0.875, topk=1.0`
1427 - `high_energy``num_queries=32, top1=0.625, topk=1.0`
1428 - cap64 winner:`hybrid`
1429 - 当前结论已进入“分子集规模不一致”阶段,必须继续做 bucket/style-aware benchmark
1430
1431
1432 ## 101. bucket/style-aware benchmark 基线已落地
1433
1434 - 新脚本:`acr-engine/scripts/ab_smoke_bucketed.py`
1435 - 已通过:`py_compile`
1436 - 已验证首个 bucket:`prefix_000_a`
1437 - `hybrid`: `4 / 1.0 / 1.0`
1438 - `high_energy`: `3 / 1.0 / 1.0`
1439 - winner: `hybrid`
1440 - 当前第二个 bucket `prefix_000_b` 仍在继续执行
1441
1442
1443 ## 最新 checkpoint(2026-06-02 13:36 UTC)
1444
1445 - 当前仍存在两个关键活跃进程:
1446 - `311494``/usr/local/miniconda3/bin/python src/data/external_adapters.py smoke-local fma data/raw/fma_small_audio --output-root /tmp/fma_real_smoke_stopcheck --eval-ratio 0.2 --query-duration 8.0 --train-epochs 1 --batch-size 2 --device cpu --max-test-queries 8 --seed 123`
1447 - `424691``/usr/local/miniconda3/bin/python run_demo.py build-index --data /tmp/fma_real_smoke_stopcheck/fma/manifests --model /tmp/fma_real_smoke_stopcheck/fma_models_smoke/best_model.pt --output /tmp/fma_real_smoke_stopcheck/fma_index_smoke --device cpu --resume --checkpoint-every-refs 100`
1448 - 已确认训练完成后的关键文件存在:
1449 - `best_model.pt`
1450 - `song_to_idx.json`
1451 - `validate-splits /tmp/fma_real_smoke_stopcheck/fma/manifests` =>
1452 - `ok=true`
1453 - `catalog_references=8000`
1454 - `train_queries=6401`
1455 - `test_queries=1593`
1456 - `val_queries=0`
1457 - 当前仍未观测到 `evaluate.py`
1458 - 当前仍未在 `fma_index_smoke/` 下观测到首个索引产物文件。
1459
1460 ### 新 session 恢复顺序
1461 204
1462 1. 先检查 `build-index` 是否仍在运行。 205 > **下次启动不要再从“要不要换模型、要不要重构数据结构”开始讨论。**
1463 2. 再检查 `fma_index_smoke/` 是否出现首个文件。 206 > 这些方向已经定了。直接从 **PostgreSQL v2 schema 落库 + Phase-1 encoder-only 执行链** 开始推进。
1464 3.`evaluate.py` 出现,立即记录 metrics / report 路径。
1465 4. 仅更新交接文档并提交,不要误带 `data/raw``data/external_smoke``/tmp`
......