MountainSort5: expose `pca_seed` / `random_seed` sorter param (pair with MS5 configurable PCA seed)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with src/spikeinterface/sorters/external/mountainsort5.py, especially the whitening_seed parameter and _params_description; check the current MountainSort5 Scheme parameter objects and issue #69 to confirm seed support before forwarding it. Then review the sorter documentation and existing MountainSort5 tests to identify where to document and check reproducibility. Done means a seed parameter is passed through, its distinction from whitening_seed and threading caveats are documented, and a small seeded-run test is added.
由索引模型根据 Issue 内容生成。
描述
Summary
si.run_sorter('mountainsort5', ...) already accepts whitening_seed and forwards it to whiten(seed=...) (#4600). There is no analogous parameter for MountainSort5's internal PCA / clustering RNG.
Callers who need deterministic, seed-controlled sorts currently set process-global np.random.seed / random.seed before run_sorter, force n_jobs=1 + single-threaded BLAS, and hope MS5 / sklearn honor the ambient RNG. That is fragile:
- On mountainsort5 < 0.5.9, unseeded
PCA()can follow the ambient NumPy RNG. - On mountainsort5 ≥ 0.5.9, PCA hardcodes
random_state=0, so ambient seeding no longer changes PCA output.
Proposal
Depends on exposing a seed in MountainSort5 itself (https://github.com/flatironinstitute/mountainsort5/issues/69).
- Add a sorter param next to
whitening_seedinsrc/spikeinterface/sorters/external/mountainsort5.py(suggested name:pca_seedorrandom_seed; default matching MS5, likely0). - Forward it into the Scheme1/Scheme2(/3) parameter objects once MS5 supports it.
- Document in
_params_descriptionand the sorter docs that:- this controls MS5 PCA / classifier PCA RNG;
whitening_seedis separate (SI whitening before MS5);n_jobs > 1/ multi-threaded BLAS can void bit-identical reproducibility.
- Add a small test: two runs with the same seed agree on spike trains (or unit count + spike counts on a tiny recording); a different seed can differ (if feasible in CI time).
Optional follow-ups (not required for this PR)
- Persist the effective seed into sorting-folder / provenance metadata.
- A top-level
seed=onrun_sorterthat fans out to sorter-specific kwargs when supported. - A short “deterministic sorting” recipe in the docs (
seed+ spawn/mp_context+threadpool_limits(1)).
I can open a PR once the MS5 parameter lands (or against a known MS5 commit if maintainers prefer).
Context
We rely on reproducible MS5 sorts for parameter sweeps and for re-running a chosen configuration with a content fingerprint of the spike trains. An explicit sorter kwarg would make that a supported SpikeInterface path instead of ambient RNG.
- 主要语言
- Python
- 星标
- 870
- 派生
- 284
- 平均合并
- 3 天 1 小时
- 30 天内合并 PR
- 41
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SpikeInterface/spikeinterface 的其他 Issue
-
Saving a multi-segment recording fails when only some segments have a t_start可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭core
难度 2/5 1-3 小时 新手友好度 84/100
SpikeInterface/spikeinterface#4914 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
SpikeInterface/spikeinterface#4842 · 3 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
SpikeInterface/spikeinterface#4510 · 2 条评论 ·
维护者通常 1 天内回复
-
BaseSorting.select_periods() drops properties, annotations and the registered recording可能已有人在做 @AxelNoun 今天认领。 未关闭bug core
难度 2/5 1-3 小时 新手友好度 20/100
SpikeInterface/spikeinterface#4915 · 3 条评论 ·
维护者通常 1 天内回复
-
Optional dependencies don't participate in extension invalidation可能已有人在做 @alejoe91 于 1 天前认领。 未关闭bug core
难度 4/5 3-5 天 新手友好度 25/100
SpikeInterface/spikeinterface#4912 ·
维护者通常 1 天内回复
查看 SpikeInterface/spikeinterface 的全部 Issue
相似的 Issue
-
area/test type/bug
难度 2/5 1-3 小时 新手友好度 76/100
Clodmony/starship-coop#70 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
punitarani/fli#270 ·
-
🐛 Bug 🔔 Pending processing
难度 2/5 1-3 小时 新手友好度 67/100
jumpserver/jumpserver#17980 ·
维护者通常 1 天内回复
-
community enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
namespace
难度 2/5 1-3 小时 新手友好度 60/100
EclipseFdn/open-vsx.org#15341 ·
维护者通常 1 天内回复