Skip to content

Extend preprocessing pipeline by defining a BasePipeline - #4755

Open
alejoe91 wants to merge 8 commits into
SpikeInterface:mainfrom
alejoe91:extend-preprocessing-pipeline
Open

Extend preprocessing pipeline by defining a BasePipeline#4755
alejoe91 wants to merge 8 commits into
SpikeInterface:mainfrom
alejoe91:extend-preprocessing-pipeline

Conversation

@alejoe91

@alejoe91 alejoe91 commented Sep 3, 2026

Copy link
Copy Markdown
Member
  • create a BasePipeline to allow inherited classes to define their own dictionary of steps to check against
  • switched dict to lists, to allow for duplicated steps

@alejoe91 alejoe91 added the preprocessing Related to preprocessing module label Sep 3, 2026
source_class_or_dict_of_sources_classes.__doc__ = source_class.__doc__
source_class_or_dict_of_sources_classes.__name__ = name
# propagate the _precomputable_kwarg_names attribute from the source class to the wrapper function
source_class_or_dict_of_sources_classes._precomputable_kwarg_names = source_class._precomputable_kwarg_names

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@chrishalcrow doing this allows us to get rid of the pp_names_to_classes

precomputable_kwarg_names = preprocessor_class._precomputable_kwarg_names
dont_apply_kwargs += precomputable_kwarg_names
preprocessor_function = self.function_names_to_functions[preprocessor_name]
if hasattr(preprocessor_function, "_precomputable_kwarg_names"):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Here we added _precomputed_kwarg_names to the function, but we still protect against not having the attrs

See https://github.com/SpikeInterface/spikeinterface/pull/4755/changes#r3932091422

@alejoe91
alejoe91 marked this pull request as ready for review September 4, 2026 08:04
@alejoe91 alejoe91 added this to the 0.105.0 milestone Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preprocessing Related to preprocessing module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant