-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kilosort4 being passed wrong information in run_sorter_by_property #3397
Comments
Maybe something with bad channels is messing with this for the KS wrapper: @chrishalcrow , @JoeZiminski , and @alejoe91 recently updated the wrapper, but it won't appear until the next release (0.101.1). so if you want to install from main you could test that. Which version of KS4 are you using. It is listed as 4.0 in your list, but that doesn't really help us. Could you do import kilosort
print(kilosort.__version__) The most recent is 4.0.17 and the one we will support with 0.101.1 (to be released soon) will be at least up to 4.0.16. |
Thanks for the response! |
Unfortunately with Kilosort there have been many changes and many bug fixes. So our wrapper only supports certain version of Kilosort4. It is very hard to make sure everything is in sync so our new policy is just to support the most up-to-date kilosort until the codebase over there stabilizes. MS5 is more stable and it's wrapper is stable. If you are comfortable with it you could try to update to KS4==4.0.16 and do spikeinterface from main or wait around a week for us to update and get spikeinterface 0.101.1 (which will only support 4.0.16). If this is really a cuda/pytorch issue on your computer and you can only use 4.0 (which I believe has bugs in it that the Kilosort team has fixed) then you would have to use it outside of the spikeinterface wrapper. |
Hi @mdmornin , I've had problems with kilosort when using recordings with less than 10 channels, so this your problems might be related to that. I've not looked into it properly yet - just flagging it while I remember! |
Hi Chris, I upgraded KS4 to 4.0.16, 4.0.14, and 4.0.17 and received the following traceback:
I am assuming this is because of the missing, new wrapper based on some of the comments I saw in #3339. I attempted to build from Main with the setup.py file in my existing environment but it didn't change the traceback. It's possible I didn't run setup.py correctly as well, I haven't ran a setup.py file in a while so I will try again tomorrow. |
Hi @mdmornin, indeed I think bad channels was added to the wrapper in #3339 and should be included on the latest version on main. Could you do
this will give you an 'editable' install so if you change the code in your downloaded repo it will be reflected in your installed, imported spikeinterface. Spikeinterface uses the It will be interesting to see whether this resolves the problem. If not, a couple of potential causes:
|
Running Rerunning the code as is provided the following warning, but so far it seems to be working now with 0.101.1 and KS4 4.0.17.
If something weird happens in the results, I'll report back, but so far this issue has been cleared up. Thanks all! |
Great glad to hear it's working @mdmornin, I'll close this for now but please feel free to reopen if any problems arise. |
I am revamping my spikesorting workflow to individually sort shanks. I have been able to do all the prerequisite steps, code included below.
When attempting to run Kilosort4, the following traceback is called:
The key message being:
ValueError: could not broadcast input array from shape (252,8,6) into shape (252,10,6)
Running get_traces and get_probe produce the correct shape (8 channels). Running mountainsort5 has so far worked leading me to believe there may be an issue with how the wrapper is handling the grouped information?
The full code minus imports is below:
environment information:
It's entirely possible I am missing a step somewhere, but maybe that's informative.
The text was updated successfully, but these errors were encountered: