`BenchmarkStudy.create` reuses the main channels of another dataset
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 benchmark/benchmark_base.py 中的 BenchmarkStudy.create 开始,追踪 main_channel_indices 在传递给 create_sorting_analyzer 之前是如何设置的。issue 提供了一个复现示例,使用 SorterStudy.create,其中一个 dataset 缺少 gt_unit_locations;先运行该示例并检查 analyzer 的通道索引。完成标准是每个 dataset 都获得适当的主通道,并且有一个回归测试覆盖属性缺失的情况。
由索引模型根据 Issue 内容生成。
描述
I found this while reading benchmark/benchmark_base.py, not in my own analyses, so this is a "for the sake of improvement" report.
In BenchmarkStudy.create, main_channel_indices is only set when the ground truth sorting has the gt_unit_locations property, but it is always passed to create_sorting_analyzer (since #4734). A dataset without this property gets the main channels of the previous dataset, or an UnboundLocalError if it is the first one. The sparsity, templates and SNR are then wrong without an error.
import tempfile
from pathlib import Path
from spikeinterface.core import generate_ground_truth_recording
from spikeinterface.benchmark import SorterStudy
if __name__ == "__main__":
datasets = {}
for key, seed in (("a", 0), ("b", 5)):
datasets[key] = generate_ground_truth_recording(num_channels=32, num_units=4, durations=[10.0], seed=seed)
datasets["b"][1].delete_property("gt_unit_locations")
cases = {key: {"label": key, "dataset": key, "params": {"sorter_name": "simple"}} for key in datasets}
study = SorterStudy.create(Path(tempfile.mkdtemp()) / "study", datasets=datasets, cases=cases)
print(study.analyzers["a"].main_channel_indices, study.analyzers["b"].main_channel_indices)
Both datasets get the same main channels. Fix: set main_channel_indices = None in the else branch, so that they are estimated. I have this locally with a test. Should I open a PR, or would you rather fix it yourselves?
- 主要语言
- Python
- 星标
- 883
- 派生
- 291
- 平均合并
- 3 天 17 小时
- 30 天内合并 PR
- 40
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 小时 新手友好度 69/100
daniel-ospina/tortoise#15308 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
difficulty:easy prio:low type:bug
难度 2/5 1-3 小时 新手友好度 72/100
NatronGitHub/Natron#2405 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
Jstar269/nakagawa-recomp#3746 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复