MouseLand / Kilosort

Fast spike sorting with drift correction for up to a thousand channels
https://kilosort.readthedocs.io/en/latest/
GNU General Public License v3.0
402 stars 220 forks source link

Pytorch library error #653

Closed Lorena-J closed 1 week ago

Lorena-J commented 4 weeks ago

Describe the issue:

Hi! I'm triyng to start the sorting with kilosort4 but there is an error with the pytorch library, i try to re-install kilosrt from fresh and the error continues, i try to convert a file and it works, but you cannot run the kilosort to do the spikesorting process. I have cuda 11.8 version and pytorch 2.2.2 version, i try also with the pytorch 2.2.1 and the cuda 12 but it doesent fix the problem, and uninstall pytroch and install it again doesen't work either.

Captura de pantalla 2024-04-03 a las 8 36 29

(The error in the miniconda prompt)

Captura de pantalla 2024-04-03 a las 8 41 16

(The error in kilosort prompt)

jacobpennington commented 4 weeks ago

Try clicking on "reset GUI" and "clear cache," then close the GUI and open it again and then select the converted file. I've noticed this happens sometimes after using the file conversion tool.

Darkweiss commented 3 weeks ago

I also got the same error running kilosort without a GPU - turns out in my case, I was inputting the wrong number of channels.

Lorena-J commented 3 weeks ago

@jacobpennington I try it and it doesn't work, I get the same error.

jacobpennington commented 3 weeks ago

@Lorena-J In that case, are you able to share a sample of data that I could use to debug this? Preferably in the original file format so that I can check the conversion process as well.

Lorena-J commented 3 weeks ago

Of course!! Here you have a sample in the original format file, it comes from Open Ephys: sample of data

jacobpennington commented 3 weeks ago

I was able to convert the data and load it fine with a stand-in 64-channel probe file. However, I did reproduce the error when I tried to load it using the default 385-channel neuropixels 1 probe, which could have happened if you have "Auto Load" checked and re-loaded the GUI after converting. Can you try unchecking "Auto Load," restarting the GUI, and then choose your data and probe again? I will also update the GUI code to prevent that from happening.

Lorena-J commented 3 weeks ago

I get the same error unchecking the 'auto load', I noticed that when I press the 'LOAD' button the error appears, but if I don't press the 'LOAD' button and I press the 'run' button it doesn't start doing anything.

jacobpennington commented 3 weeks ago

Can you please post a screenshot of what the entire GUI looks like just before you click on 'LOAD'?

Lorena-J commented 2 weeks ago

Yes, sure, here is a screenshot before pressing 'LOAD', at that moment I can press the 'run' button but it doesn't work, when I press 'run' it doesn't give me any error, it just doesn't work.

Captura de pantalla 2024-04-12 a las 9 25 54

And this other screenshot is when I click 'LOAD' and the error i get in kilosort terminal

Captura de pantalla 2024-04-12 a las 9 26 18 Captura de pantalla 2024-04-12 a las 9 29 25
jacobpennington commented 2 weeks ago

Okay, sorry this is being so stubborn. Are you able to send the exact .bin and .prb files you're using there so I can check it with those? I can't see any reason why this should load for me but not you unless we're not actually using the same data.

Lorena-J commented 2 weeks ago

Sure! here you have the .prb and the .bin (the .bin file was converted with kilosort4 conversor, from open ephys .continuous files). The original .continuous are also in the folder: all files

jacobpennington commented 2 weeks ago

Okay, I found the problem. It's not loading because your channel map is numbered 1 to 64 instead of 0 to 63, as I mentioned in one of the other issues you posted. That's causing the error, it's just not a very helpfully worded error, but I'll add something to catch that in the future.

Something I noticed while I was looking at this, which isn't related to this error but might cause other problems: it looks like one of the contacts in your probe file might be specified incorrectly. I see this in the GUI: image

jacobpennington commented 1 week ago

I'm going to close this for now since the error has been figured out, please let us know if you have any more trouble with this.