Skip to content

paramset 23 - kilosort2 - SpikeSortingError: Spike sorting in docker failed #183

@MilagrosMarin

Description

@MilagrosMarin
{'table_name': '_s_i_clustering',
 'key_hash': '7aef4e050c849f8b66a7127b7bcf16f3',
 'status': 'error',
 'key': {'organoid_id': 'O09',
  'experiment_start_time': datetime.datetime(2023, 5, 3, 17, 33),
  'insertion_number': 0,
  'start_time': datetime.datetime(2023, 5, 11, 4, 22),
  'end_time': datetime.datetime(2023, 5, 11, 4, 27),
  'paramset_idx': 23},
 'error_message': 'SpikeSortingError: Spike sorting in docker failed with the following error:\nTraceback (most recent call last):\n  File "/mnt/efs/works/org/utah/proj/organoids/outbox/O09-12_raw/202305110422_202305110427/O09/kilosort3_23/kilosort3/in_container_sorter_script.py", line 23, in <module>\n    sorting = run_sorter_local(\n  File "/root/.local/lib/python3.9/site-packages/spikeinterface/sorters/runsorter.py", line 290, in run_sorter_local\n    SorterClass.set_params_to_folder(recording, folder, sorter_params, verbose)\n  File "/root/.local/lib/python3.9/site-packages/spikeinterface/sorters/basesorter.py", line 192, in set_params_to_folder\n    raise ValueError(error_msg)\nValueError: Invalid parameters: [\'max_threads_per_process\'] \nValid parameters are: dict_keys([\'detect_threshold\', \'projection_threshold\', \'preclust_threshold\', \'whiteningRange\', \'car\', \'minFR\', \'minfr_goodchannels\', \'nblocks\', \'sig\', \'freq_min\', \'sigmaMask\', \'lam\', \'nPCs\', \'ntbuff\', \'nfilt_factor\', \'do_correction\', \'NT\', \'AUCsplit\', \'wave_length\', \'keep_good_only\', \'skip_kilosort_preprocessing\', \'scaleproc\', \'save_rez_to_mat\', \'delete_tmp_files\', \'delete_recording_dat\', \'pool_engine\', \'n_jobs\', \'chunk_duration\', \'progress_bar\', \'mp_context\', \'max_threads_per_worker\'])\n',
 'error_stack': 'Traceback (most recent call last):\n  File "/opt/conda/lib/python3.10/site-packages/datajoint/autopopulate.py", line 397, in _populate1\n    make(dict(key), **(make_kwargs or {}))\n  File "/opt/conda/lib/python3.10/site-packages/element_array_ephys/spike_sorting/si_spike_sorting.py", line 278, in make\n    _run_sorter()\n  File "/opt/conda/lib/python3.10/site-packages/element_interface/utils.py", line 235, in wrapped\n    results = func(*args, **kwargs)\n  File "/opt/conda/lib/python3.10/site-packages/element_array_ephys/spike_sorting/si_spike_sorting.py", line 264, in _run_sorter\n    si_sorting: si.sorters.BaseSorter = si.sorters.run_sorter(\n  File "/opt/conda/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py", line 196, in run_sorter\n    return run_sorter_container(\n  File "/opt/conda/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py", line 673, in run_sorter_container\n    raise SpikeSortingError(f"Spike sorting in {mode} failed with the following error:\\n{run_sorter_output}")\nspikeinterface.sorters.utils.misc.SpikeSortingError: Spike sorting in docker failed with the following error:\nTraceback (most recent call last):\n  File "/mnt/efs/works/org/utah/proj/organoids/outbox/O09-12_raw/202305110422_202305110427/O09/kilosort3_23/kilosort3/in_container_sorter_script.py", line 23, in <module>\n    sorting = run_sorter_local(\n  File "/root/.local/lib/python3.9/site-packages/spikeinterface/sorters/runsorter.py", line 290, in run_sorter_local\n    SorterClass.set_params_to_folder(recording, folder, sorter_params, verbose)\n  File "/root/.local/lib/python3.9/site-packages/spikeinterface/sorters/basesorter.py", line 192, in set_params_to_folder\n    raise ValueError(error_msg)\nValueError: Invalid parameters: [\'max_threads_per_process\'] \nValid parameters are: dict_keys([\'detect_threshold\', \'projection_threshold\', \'preclust_threshold\', \'whiteningRange\', \'car\', \'minFR\', \'minfr_goodchannels\', \'nblocks\', \'sig\', \'freq_min\', \'sigmaMask\', \'lam\', \'nPCs\', \'ntbuff\', \'nfilt_factor\', \'do_correction\', \'NT\', \'AUCsplit\', \'wave_length\', \'keep_good_only\', \'skip_kilosort_preprocessing\', \'scaleproc\', \'save_rez_to_mat\', \'delete_tmp_files\', \'delete_recording_dat\', \'pool_engine\', \'n_jobs\', \'chunk_duration\', \'progress_bar\', \'mp_context\', \'max_threads_per_worker\'])\n\n',
 'timestamp': datetime.datetime(2025, 7, 29, 11, 56, 35)}
{'paramset_idx': 23,
 'clustering_method': 'kilosort3',
 'paramset_desc': 'default kilosort3 with no drift correction',
 'param_set_hash': UUID('35b4975e-704f-b1a8-1648-5b89086a711c'),
 'params': {'SI_PREPROCESSING_METHOD': 'organoid_preprocessing',
  'SI_SORTING_PARAMS': {'detect_threshold': 6,
   'projection_threshold': [9, 9],
   'preclust_threshold': 8,
   'whiteningRange': 32,
   'car': True,
   'minFR': 0.2,
   'minfr_goodchannels': 0.2,
   'nblocks': 5,
   'sig': 20,
   'freq_min': 300,
   'sigmaMask': 30,
   'lam': 20.0,
   'nPCs': 3,
   'ntbuff': 64,
   'nfilt_factor': 4,
   'do_correction': False,
   'NT': None,
   'AUCsplit': 0.8,
   'wave_length': 61,
   'keep_good_only': False,
   'skip_kilosort_preprocessing': False,
   'scaleproc': None,
   'save_rez_to_mat': False,
   'delete_tmp_files': ('matlab_files',),
   'delete_recording_dat': False,
   'n_jobs': 1,
   'chunk_duration': '1s',
   'progress_bar': True,
   'mp_context': None,
   'max_threads_per_process': 1},
  'SI_POSTPROCESSING_PARAMS': {'extensions': {'random_spikes': {},
    'waveforms': {},
    'templates': {},
    'noise_levels': {},
    'correlograms': {},
    'isi_histograms': {},
    'principal_components': {'n_components': 5, 'mode': 'by_channel_local'},
    'spike_amplitudes': {},
    'spike_locations': {},
    'template_metrics': {'include_multi_channel_metrics': True},
    'template_similarity': {},
    'unit_locations': {},
    'quality_metrics': {}},
   'job_kwargs': {'n_jobs': -1, 'chunk_duration': '1s'},
   'export_to_phy': True,
   'export_report': True}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions