Skip to content

Add empty metadata to template_metrics on load if doesn't exist#4473

Open
chrishalcrow wants to merge 1 commit intoSpikeInterface:mainfrom
chrishalcrow:backward-compat-peaks-data
Open

Add empty metadata to template_metrics on load if doesn't exist#4473
chrishalcrow wants to merge 1 commit intoSpikeInterface:mainfrom
chrishalcrow:backward-compat-peaks-data

Conversation

@chrishalcrow
Copy link
Copy Markdown
Member

Fixes #4471, using option 1.

In this PR, if you load an analyzer from version <0.104, the expected metadata for template_metrics will be added. It's empty but has the right structure, so won't error when you do merges/splits etc.

I like this solution because it ensures that all analyzers loaded with 0.104 will have the same structure.

Only issue is when you have an analyzer from <0.104 with template metrics and no templates. I think this is an edge case.

We really need to add a backwards compatibility focused test suite sometime soon...

@alejoe91
Copy link
Copy Markdown
Member

Nice!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't add tmp_data_to_save to old merged analyzer

2 participants