`analyse_residual` fails with its default arguments since `detect_peaks` changed signature
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず benchmark/residual_analysis.py と benchmark_sorter_without_gt.py から始め、次に detect_peaks のシグネチャと、issue で言及されているスキップされた2つのテストを確認してください。デフォルト引数と job の kwargs が両方のベンチマーク経路で機能することを検証してください。報告された TypeError がなくなり、関連するテストがパスすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I found this while reading benchmark/residual_analysis.py, not in my own analyses, so this is a "for the sake of improvement" report.
analyse_residual calls detect_peaks(residual, **detect_peaks_kwargs, **job_kwargs), but since #4793 detect_peaks only accepts method, method_kwargs, pipeline_kwargs, verbose and job_kwargs. The default detect_peaks_kwargs (with peak_sign and detect_threshold) and any job kwarg now raise a TypeError.
from spikeinterface.core import generate_ground_truth_recording, create_sorting_analyzer
from spikeinterface.benchmark import analyse_residual
recording, sorting = generate_ground_truth_recording(durations=[10.0], num_channels=8, num_units=4, seed=0)
analyzer = create_sorting_analyzer(sorting, recording, sparse=True)
analyzer.compute(["random_spikes", "templates", "noise_levels"])
analyzer.compute("amplitude_scalings", handle_collisions=False)
for args, job_kwargs in (((), {}), (({"method": "locally_exclusive"},), {"n_jobs": 1})):
try:
analyse_residual(analyzer, *args, **job_kwargs)
except TypeError as error:
print(error)
# Output on current main:
# detect_peaks() got an unexpected keyword argument 'peak_sign'
# detect_peaks() got an unexpected keyword argument 'n_jobs'
# Expected: no error
Reading the code, SorterBenchmarkWithoutGroundTruth.compute_result makes the same call, so SorterStudyWithoutGroundTruth.compute_results() fails too; the two related tests are marked skip.
Fix: call detect_peaks(residual, method=..., method_kwargs=..., job_kwargs=job_kwargs), and update the default dict and the call in benchmark_sorter_without_gt.py.
I can open a PR with a test if you agree.
- 主要言語
- Python
- スター
- 883
- フォーク
- 291
- 平均マージ
- 3日 17時間
- マージ済み PR(30日)
- 40
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SpikeInterface/spikeinterface のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
SpikeInterface/spikeinterface#5008 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
SpikeInterface/spikeinterface#5007 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
SpikeInterface/spikeinterface#5006 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
SpikeInterface/spikeinterface#5005 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
SpikeInterface/spikeinterface#5003 ·
メンテナーはふだん 2 日以内に返信
SpikeInterface/spikeinterface の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
available bug good first issue tooling
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Nixitov/Riptide-Native#816 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
teng-lin/notebooklm-py#2593 ·
メンテナーはふだん 1 日以内に返信
-
claimed-by:collie role:small-fix status:running
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Beovulfo/herd-sdlc#325 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
omarelshamy25x/shamy-arabic-nlp#267 ·
メンテナーはふだん 1 日以内に返信