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

SortingAnalyzer doesn't respect order of compute in case of nodepipeline + non-nodepipeline code #2772

Closed
zm711 opened this issue Apr 26, 2024 · 3 comments · Fixed by #2773
Closed
Labels
bug Something isn't working core Changes to core module

Comments

@zm711
Copy link
Collaborator

zm711 commented Apr 26, 2024

MRE

analyzer.compute(['random_spikes', 'waveforms', 'templates' , 
'noise_levels', 'spike_locations', 'spike_amplitudes', 'principal_components', 'quality_metrics'])

Problem

It will calculate the non-node pipeline first despite the fact that to do all quality_metrics requires things like spike_amplitudes.

Solution

I know in the code it separates out the code into the two streams of pipeline and nonpipeline, so maybe we just need to document that this will happen? I mean we could also try to have something more intelligent that sorts this out, but with the current state I don't know think there is an easy solution.

@alejoe91
Copy link
Member

@zm711 this is a very tricky point. Currently, the only extension that optionally depends on others is the quality_metrics. IMO, for simplicity, we could hard-code the quality metrics as post-pipeline. Alternatively, we could add and optional case in the depends on (e.g. depend_on="noise_levels|spike_amplitudes[optional]|spike_locations[optional]" and have a pre-pipeline and post-pipeline computation.

@samuelgarcia what do you think?

@alejoe91 alejoe91 added bug Something isn't working core Changes to core module labels Apr 29, 2024
@samuelgarcia
Copy link
Member

I agree with Alessio solution with pre and post pipeline but we are a bit busy now to make it so I would hard code the quality metrics after the pipeline with a very clear comments that it is temporary.

@zm711
Copy link
Collaborator Author

zm711 commented Apr 29, 2024

This sounds good to me. I know how to avoid, I'm more worried that others will do these commands and not understand why qm is failing. I'll check out the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Changes to core module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants