pykilosort, spykingcircus and rtsort wrappers are broken on main
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
指定されたメソッドの sorters/external/pykilosort.py、sorters/external/spyking_circus.py、sorters/external/rt_sort.py を読み、関連する sorter のテストを確認してください。報告された3つの呼び出しを修正し、ラッパーが想定されるパッケージバージョンを受け入れ、sorting の結果を読み込むことを検証してください。報告された各失敗がテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I found this while reading sorters/external/pykilosort.py, spyking_circus.py and rt_sort.py, not in my own analyses, so this is a "for the sake of improvement" report. Three wrappers are broken on the current main:
- pykilosort:
_run_from_folder(l. 157) callsbinary_compatible_with(time_axis=0, file_paths_lenght=1). #4222 fixed the same typo in_setup_recordingonly, so the run fails withTypeErrorbefore pykilosort'srunis called. - spykingcircus:
get_sorter_version(l. 76) callsversion("circus"), but the distribution is namedspyking-circus(circusis only its import name).run_from_foldercalls it before sorting, so the run fails withPackageNotFoundError. This came with d2392ce, which replacedcircus.__version__. - rtsort:
_get_result_from_folder(l. 192) callsNumpySorting.load_from_folder, removed in #4664, so reading the result fails withAttributeErrorafter sorting.
import importlib
import importlib.metadata
import sys
import tempfile
from pathlib import Path
from spikeinterface.core import generate_recording, generate_sorting
from spikeinterface.sorters.external.rt_sort import RTSortSorter
from spikeinterface.sorters.external.spyking_circus import SpykingcircusSorter
if __name__ == "__main__":
with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmp:
tmp = Path(tmp)
# 1. pykilosort.py, _run_from_folder: same call as in the wrapper
recording = generate_recording(num_channels=4, durations=[1.0], seed=0)
try:
recording.binary_compatible_with(time_axis=0, file_paths_lenght=1)
except TypeError as e:
print("TypeError:", e)
# TypeError: BaseRecording.binary_compatible_with() got an unexpected keyword argument 'file_paths_lenght'
# 2. spyking_circus.py: distribution "spyking-circus" with import name "circus",
# simulated by a minimal dist-info folder
site = tmp / "site"
(site / "circus").mkdir(parents=True)
(site / "circus" / "__init__.py").write_text("")
(site / "spyking_circus-1.1.0.dist-info").mkdir()
(site / "spyking_circus-1.1.0.dist-info" / "METADATA").write_text(
"Metadata-Version: 2.1\nName: spyking-circus\nVersion: 1.1.0\n"
)
sys.path.insert(0, str(site))
importlib.invalidate_caches()
print(SpykingcircusSorter.is_installed(), importlib.metadata.version("spyking-circus")) # True 1.1.0
try:
SpykingcircusSorter.get_sorter_version()
except importlib.metadata.PackageNotFoundError as e:
print("PackageNotFoundError:", e)
# PackageNotFoundError: No package metadata was found for circus
sys.path.remove(str(site))
# 3. rt_sort.py: reading a NumpySorting saved as the wrapper saves it
sorting = generate_sorting(num_units=3, durations=[1.0], seed=0)
sorting.save(folder=tmp / "rt_sorting")
try:
RTSortSorter._get_result_from_folder(tmp)
except AttributeError as e:
print("AttributeError:", e)
# AttributeError: type object 'NumpySorting' has no attribute 'load_from_folder'
None of these sorters is installed on my side: the calls above reproduce the failing lines, and the spyking-circus install is simulated by a minimal dist-info folder.
Fix:
- pykilosort:
file_paths_length=1. - spykingcircus:
version("spyking-circus"). - rtsort:
NumpySorting.load(...), whichload_from_folderwrapped.
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時間 初心者へのやさしさ 76/100
SpikeInterface/spikeinterface#5004 ·
メンテナーはふだん 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 日以内に返信