Move the Base.save to Sorting.save() and Recording.save() - #4671
Merged
alejoe91 merged 30 commits intoSep 17, 2026
Merged
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. |
Co-authored-by: Chris Halcrow <57948917+chrishalcrow@users.noreply.github.com>
alejoe91
approved these changes
Sep 17, 2026
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.
This PR refactors the
BaseExtractor.save()function to unify and simplify the implementation:_save()function and deprecatesave_to_memory,save_to_folder,save_to_zarr: thesave()function is now the only entry point for savingBaseRecordingandBaseSortingroute the save to the main backend formats, which have awrite_*statich method to handle all the write logic (e.g.,BinaryFolderRecording.write_recording())folder_metadataconcept, used previously to save the probe object and not needed since UseProbeGroupobject instead ofcontact_vectorproperty andset_probe/probegroupfromselect_channels_with_probe/probegroup#4465 (now theprobegroupis dumped to dictionary as extra metadata)BaseSnippetsobject, since it's not an intended use case we want to suppor in the futureIn addition to these changes, this PR also integrates #4689, which improves the handling of times in several ways:
write_binaryfunction to also write timestamps in chunks when availableFrameSliceRecoridngandBasePreprocessorto lazily handleand return timestamps from parent, instead od making a full copy