Move the Base.save to Sorting.save() and Recording.save() - #4671
Open
samuelgarcia wants to merge 25 commits into
Open
samuelgarcia wants to merge 25 commits into
samuelgarcia wants to merge 25 commits into
Conversation
move saving logic to extractor classes
for more information, see https://pre-commit.ci
Base.save to Sorting.save() and Recording.save()
for more information, see https://pre-commit.ci
samuelgarcia
marked this pull request as ready for review
September 8, 2026 11:00
…keinterface into refactor_base_save_dump
for more information, see https://pre-commit.ci
… NumpyFolderSorting
…keinterface into refactor_base_save_dump
for more information, see https://pre-commit.ci
Member
|
@samuelgarcia fixed some bugs in preprocessing, but there are more. Do you want me to fix it? |
Member
|
@samuelgarcia ported changes from #4689 (timestamps handling + removing One main question: in #4689 , I added an extra Here I propose a modified version: if the user "messes" with timestamps, this is propagated to dict no matter what. Note that:
Let me know what you think! |
samuelgarcia
commented
Sep 10, 2026
alejoe91
reviewed
Sep 15, 2026
alejoe91
reviewed
Sep 15, 2026
alejoe91
reviewed
Sep 15, 2026
| dump_dict["annotations"] = { | ||
| k: self._annotations.get(k) for k in self._main_annotations if self._annotations.get(k) is not None | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
Would be nice to save the main_ids somewhere near here
…refactor_base_save_dump
Member
|
@samuelgarcia @chrishalcrow all done! Ready to merge on my end. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move saving logic to extractor classes.
For historical reason, lazyness and original bad design, the BaseExtractor.save() was a terrible mess for:
It was using some kind of "hook" to sub classes and the logic was almost impossible to follow.
I tried to move the logic save()/load() to classe (BinaryFolderRecording, ZarrRecordingExtractor, SharedMemoryRecording, ZarrSortingExtractor, NpzFolderSorting, NumpyFolderSorting).
The code looks quite strange at soe places but at least it is easier follow.
@alejoe91 : the time vector handling is not done correctly.
But your PR #4689 should be rebase on this one I think. Lets do it togoether.