Skip to content
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

Remove Non-Serializable writing of json #3482

Merged
merged 5 commits into from
Nov 4, 2024

Conversation

zm711
Copy link
Collaborator

@zm711 zm711 commented Oct 15, 2024

The note says remove after 0.100 and this caused an issue recently #3448 with the error not being super clear (because recording was None) the error the user saw was that None didn't have get_num_channels). Since this isn't supported we shouldn't write this here, right? I have run local tests because I need to run, so will update after the CI if needed.

@zm711 zm711 added sorters Related to sorters module deprecations Related to code deprecation labels Oct 15, 2024
Comment on lines +148 to +151
raise RuntimeError(
"This recording is not serializable and so can not be sorted. Consider `recording.save()` to save a "
"compatible binary file."
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep the possibility of running a sorting on a recording living only in memory.
And so no dump into a file.
This could be usefull for benchmark of simulated in memeory.
So I would pass silently no ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was inspired by the issue I linked where we asked you to comment. fine to let it pass if you're okay with it, but do you want to read that issue and comment there or here on your opinions about it.

Copy link
Collaborator Author

@zm711 zm711 Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your comment in the issue what I would argue is we add this runtime error but with a message like:

This recording is not serializable and so can not be sorted. Consider recording.save() to generate a compatible binary file. We plan to support in memory sorting for some sorters in the future

But it is not currently really supported. So we should truly warn people about something impossible and then you remove the error when you have the sorting in-memory actually worked on.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sam and I discussed this and he is okay with the error for now. Any opinions on adding either

  1. a comment saying we should support in-memory in the future
  2. saying in the error message that we plan to support in the future

@alejoe91

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I think it's fine to as is :)

@alejoe91 alejoe91 merged commit 1295c7e into SpikeInterface:main Nov 4, 2024
15 checks passed
@zm711 zm711 deleted the basesorter branch November 4, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecations Related to code deprecation sorters Related to sorters module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants