SpikeInterface / SpikeInterface/spikeinterface-dockerfiles
Failures for some containerized sorters, but not others
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 9
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
I was testing some sorters that I typically don't use, and got some issues:
- HerdingSpikes
hs_output = sorting_dir / 'sorting_herdingspikes'
container_image = 'spikeinterface/herdingspikes-base'
params_hs = {} # use SI defaults
sorting_hs = si.run_sorter(
sorter_name='herdingspikes',
recording=rec_saved,
folder=hs_output,
remove_existing_folder=True,
docker_image=container_image, #True,
verbose=True,
**params_hs
)
installation_mode='auto' switching to installation_mode: 'github'
Starting container
Installing spikeinterface with github in container
Installing neo with pypi in container
Running herdingspikes sorter inside spikeinterface/herdingspikes-base
Stopping container
---------------------------------------------------------------------------
SpikeSortingError Traceback (most recent call last)
Cell In[27], line 6
2 container_image = 'spikeinterface/herdingspikes-base'
4 params_hs = {} # use SI defaults
----> 6 sorting_hs = si.run_sorter(
7 sorter_name='herdingspikes',
8 recording=rec,
9 folder=hs_output,
10 remove_existing_folder=True,
11 docker_image=container_image, #True,
12 verbose=True,
13 **params_hs
14 )
15 print('HerdingSpikes units:', len(sorting_hs.get_unit_ids()))
File ~/mambaforge/envs/si_env/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py:204, in run_sorter(sorter_name, recording, folder, remove_existing_folder, delete_output_folder, verbose, raise_error, docker_image, singularity_image, delete_container_files, with_output, **sorter_params)
198 if not has_spython():
199 raise RuntimeError(
200 "The python `spython` package must be installed to "
201 "run singularity. Install with `pip install spython`"
202 )
--> 204 return run_sorter_container(
205 container_image=container_image,
206 mode=mode,
207 **common_kwargs,
208 )
210 return run_sorter_local(**common_kwargs)
File ~/mambaforge/envs/si_env/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py:681, in run_sorter_container(sorter_name, recording, mode, container_image, folder, remove_existing_folder, delete_output_folder, verbose, raise_error, with_output, delete_container_files, extra_requirements, installation_mode, spikeinterface_version, spikeinterface_folder_source, **sorter_params)
679 if run_error:
680 if raise_error:
--> 681 raise SpikeSortingError(f"Spike sorting in {mode} failed with the following error:\n{run_sorter_output}")
682 else:
683 if with_output:
SpikeSortingError: Spike sorting in docker failed with the following error:
- Combinato
combinato_output = sorting_dir / 'sorting_combinato'
container_image = 'spikeinterface/combinato-base'
params_combinato = {} # use SI defaults
sorting_combinato = si.run_sorter(
sorter_name='combinato',
recording=rec,
folder=combinato_output,
remove_existing_folder=True,
docker_image=container_image, #True,
verbose=True,
**params_combinato
)
installation_mode='auto' switching to installation_mode: 'github'
Starting container
Installing spikeinterface with github in container
Installing neo with pypi in container
Running combinato sorter inside spikeinterface/combinato-base
Stopping container
---------------------------------------------------------------------------
SpikeSortingError Traceback (most recent call last)
Cell In[26], line 6
2 container_image = 'spikeinterface/combinato-base'
4 params_combinato = {} # use SI defaults
----> 6 sorting_combinato = si.run_sorter(
7 sorter_name='combinato',
8 recording=rec,
9 folder=combinato_output,
10 remove_existing_folder=True,
11 docker_image=container_image, #True,
12 verbose=True,
13 **params_combinato
14 )
15 print('Combinato units:', len(sorting_combinato.get_unit_ids()))
File ~/mambaforge/envs/si_env/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py:204, in run_sorter(sorter_name, recording, folder, remove_existing_folder, delete_output_folder, verbose, raise_error, docker_image, singularity_image, delete_container_files, with_output, **sorter_params)
198 if not has_spython():
199 raise RuntimeError(
200 "The python `spython` package must be installed to "
201 "run singularity. Install with `pip install spython`"
202 )
--> 204 return run_sorter_container(
205 container_image=container_image,
206 mode=mode,
207 **common_kwargs,
208 )
210 return run_sorter_local(**common_kwargs)
File ~/mambaforge/envs/si_env/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py:681, in run_sorter_container(sorter_name, recording, mode, container_image, folder, remove_existing_folder, delete_output_folder, verbose, raise_error, with_output, delete_container_files, extra_requirements, installation_mode, spikeinterface_version, spikeinterface_folder_source, **sorter_params)
679 if run_error:
680 if raise_error:
--> 681 raise SpikeSortingError(f"Spike sorting in {mode} failed with the following error:\n{run_sorter_output}")
682 else:
683 if with_output:
SpikeSortingError: Spike sorting in docker failed with the following error:
Warning! The recording is already filtered, but combinato filter is enabled
Traceback (most recent call last):
File "/home/wanglab/data/TJ_Oscillator/LO_04/2025_08_26/LO_04_004/processed_data/spike_sorting_output_nb/in_container_sorter_script.py", line 23, in <module>
sorting = run_sorter_local(
^^^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.12/site-packages/spikeinterface/sorters/runsorter.py", line 300, in run_sorter_local
SorterClass.setup_recording(recording, folder, verbose=verbose)
File "/root/.local/lib/python3.12/site-packages/spikeinterface/sorters/basesorter.py", line 242, in setup_recording
cls._setup_recording(recording, sorter_output_folder, sorter_params, verbose)
File "/root/.local/lib/python3.12/site-packages/spikeinterface/sorters/external/combinato.py", line 133, in _setup_recording
assert len(chan_ids) == 1, "combinato is a single-channel recording"
^^^^^^^^^^^^^^^^^^
AssertionError: combinato is a single-channel recording
Sorting the same recording object worked with Kilosort4 and MountainSort5 (containers), and internal sorters Spyking Circus2 and Tridesclous2 (not containers).
Is it an issue with passing appropriate arguments to those two sorters? Or that the recording is not appropriate for those sorters? Or something else?
The recording object has these properties:
CommonReferenceRecording: 378 channels - 30.0kHz - 1 segments - 54,261,812 samples - 1,808.73s (30.15 minutes) - int16 dtype - 38.20 GiB
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the run_sorter_container path in spikeinterface/sorters/runsorter.py and the Combinato setup in spikeinterface/sorters/external/combinato.py, including the single-channel assertion shown in the traceback. Re-run the HerdingSpikes and Combinato examples with their listed container images and the 378-channel recording. Done means the cause and supported recording or argument requirements for both failures are established, with a regression test or documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100