MountainSort5: expose `pca_seed` / `random_seed` sorter param (pair with MS5 configurable PCA seed)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 43/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 872
- Forks
- 287
- Merge moyen
- 2 j 9 h
- PR mergées (30 j)
- 47
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de SpikeInterface/spikeinterface
-
bug sorters
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
SpikeInterface/spikeinterface#4924 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
SpikeInterface/spikeinterface#4842 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
SpikeInterface/spikeinterface#4510 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
get_noise_levels returns a cached value even when the call asks for a different seed or chunksOuvertebug discussion
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
SpikeInterface/spikeinterface#4928 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
discussion
Difficulté 3/5 1-2 jours Accessibilité débutants 54/100
SpikeInterface/spikeinterface#4927 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de SpikeInterface/spikeinterface
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
FAIRmat-NFDI/pynxtools#861 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
NVIDIA/nsight-python#88 ·
Les mainteneurs répondent en général sous 1 jour
-
Criteria can pass when the deliverable is missingPeut-être pris @clementtisseau l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
harveyai/harvey-labs#217 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
priority/medium roadmap/v1.1.1 stakeholder/rapr type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
databrickslabs/ontos#1420 ·
Les mainteneurs répondent en général sous 3 jours