pykilosort
pykilosort copied to clipboard
implement spikeinterface wrapper
See https://github.com/SpikeInterface/spikesorters/issues/177
Hi @samuelgarcia. It'd be cool to do this. We are going to add a few more features / releases over the next month or so then might be in a good state to make this happen.
OK tell us when there is a releasde on pypi. Will you add some CLI or is it a pure python interface ? The old wrapper was done with generating a ".m" file.
Will do.
Pure python to start with. NB: there is no CPU-only support right now (like the matlab 2.0 version requires a GPU).
I can guess so if you use cupy.
I started a wrapper in spikeinterface here https://github.com/SpikeInterface/spikeinterface/pull/95 Note that this wrapper is part of a "big refactoring". So it is experimental.
The wrapper is simple but I am not yet able to run pyks because of installation problems dur to cuda. Stuff like that
File "/home/samuel.garcia/Documents/SpikeInterface/spikeinterface/spikeinterface/sorters/pykilosort/pykilosort.py", line 95, in _run_from_folder
run(
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/pykilosort-2.0.0a0-py3.8.egg/pykilosort/main.py", line 165, in run
out = clusterSingleBatches(ctx)
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/pykilosort-2.0.0a0-py3.8.egg/pykilosort/cluster.py", line 450, in clusterSingleBatches
wPCA = extractPCfromSnippets(proc, probe=probe, params=params, Nbatch=Nbatch)
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/pykilosort-2.0.0a0-py3.8.egg/pykilosort/cluster.py", line 143, in extractPCfromSnippets
U, Sv, V = svdecon(CC)
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/pykilosort-2.0.0a0-py3.8.egg/pykilosort/cptools.py", line 302, in svdecon
D, U = cp.linalg.eigh(C, 'U')
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/cupy/linalg/eigenvalue.py", line 133, in eigh
return _syevd(a, UPLO, True)
File "/home/samuel.garcia/.virtualenvs/py38/lib/python3.8/site-packages/cupy/linalg/eigenvalue.py", line 82, in _syevd
syevd(
File "cupy_backends/cuda/libs/cusolver.pyx", line 2068, in cupy_backends.cuda.libs.cusolver.ssyevd
File "cupy_backends/cuda/libs/cusolver.pyx", line 2077, in cupy_backends.cuda.libs.cusolver.ssyevd
File "cupy_backends/cuda/libs/cusolver.pyx", line 700, in cupy_backends.cuda.libs.cusolver.check_status
cupy_backends.cuda.libs.cusolver.CUSOLVERError: CUSOLVER_STATUS_INTERNAL_ERROR
One question : how is supposed to be the output ?