flatironinstitute/mountainsort5

Running MS5 through Docker with SpikeInterface

wesleypclawson opened this issue · 4 comments

Currently trying to process Maxwell HD MEA data with SpikeInterface and MS5. I was able to get the process started and did some light troubleshooting, but am stuck with two parameters that I can't seem to figure out.

It's both temporary_base_dir, which I tried setting to '\tmp' like the example files, but the default of 'none' also throws the error.

For `n_jobs_for_preprocessing', nothing I put in seems to work. The default is -1, which threw the initial error, but I've tried 1-8 with no change in the error or logs.

Error:

Traceback (most recent call last):
  File "/home/mxwbio/sitest/Sorting/in_container_sorter_script.py", line 23, in <module>
    sorting = run_sorter_local(
  File "[/usr/local/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py", line 171](http://localhost:8888/usr/local/lib/python3.10/site-packages/spikeinterface/sorters/runsorter.py#line=170), in run_sorter_local
    SorterClass.set_params_to_folder(recording, output_folder, sorter_params, verbose)
  File "[/usr/local/lib/python3.10/site-packages/spikeinterface/sorters/basesorter.py", line 176](http://localhost:8888/usr/local/lib/python3.10/site-packages/spikeinterface/sorters/basesorter.py#line=175), in set_params_to_folder
    raise AttributeError("Bad parameters: " + str(bad_params))
AttributeError: Bad parameters: ['temporary_base_dir', 'n_jobs_for_preprocessing']

Here are the params that get passed inside of ss.run_sorter

{'scheme': 1,
 'detect_threshold': 5.5,
 'detect_sign': -1,
 'detect_time_radius_msec': 0.5,
 'snippet_T1': 20,
 'snippet_T2': 20,
 'npca_per_channel': 3,
 'npca_per_subdivision': 10,
 'snippet_mask_radius': 250,
 'scheme1_detect_channel_radius': 150,
 'scheme2_phase1_detect_channel_radius': 200,
 'scheme2_detect_channel_radius': 50,
 'scheme2_max_num_snippets_per_training_batch': 200,
 'scheme2_training_duration_sec': 300,
 'scheme2_training_recording_sampling_mode': 'uniform',
 'scheme3_block_duration_sec': 1800,
 'freq_min': 300,
 'freq_max': 4500,
 'filter': False,
 'whiten': True,
 'temporary_base_dir': '/tmp',
 'n_jobs_for_preprocessing': 2}

@wesleypclawson,

The most recent docker file is for mountainsort5==0.5.3 whereas the code base is mountainsort5==0.5.4. I believe that those params were added between. If you want confirmation you try to run mountainsort5 locally (pip install mountainsort5 into your environment). If you really want to use docker only then you would need to post the request on the main spikeinterface repo to update the docker container to pull mountainsort5==0.5.4 or make your own docker container with 0.5.4.

@zm711 Thanks! I'm out of the office over the weekend, but I'll try a local install when I'm back Monday. If it works well, I'll ping the SpikeInterface team.

Howdy @wesleypclawson, before you test we made another api change at the spikeinterface level for using the MS5 wrapper so doublecheck that. Because TemporaryDirectory doesn't work on Windows quite write we went with a different strategy which means we don't need these extra arguments you're missing for this issue.