Repository navigation
Map nn_isolation and nn_noise_overlap to nn_advanced when loading old quality metrics - #4975
Merged
alejoe91 merged 1 commit intoDec 2, 2026
Conversation
quality metrics Analyzers and WaveformExtractor folders saved before 0.104 list nn_isolation and nn_noise_overlap as metric names. Nowadays these metrics are merged into nn_advanced (which always computes both isolation and noise overlap, whereas previously it was possible that only 1 had been computed). So converting a WaveformExtractor folder saved before 0.104 raises a ValueError, and merging units on an analyzer saved before 0.104 fails. This maps the names (nn_isolation and nn_noise_overlap to nn_advanced) on load (as is already done for isolation_distance and l_ratio). If both legacy metrics were computed, nn_advanced takes nn_isolation's parameters, otherwise it takes the parameters of whichever legacy metric was used. If both were computed with different parameters, nn_noise_overlap's parameters are lost, and a warning is raised. There is no way around losing one set: nn_advanced has a single set of parameters for both metrics. The nn_noise_overlap values already stored are unchanged, but the parameters recorded for them are now nn_isolation's, and nn_noise_overlap values recomputed later (e.g. for units created by a merge) use nn_isolation's parameters. This should be rare. The two legacy metrics had the same default parameters in every release that had them, so they differ only if someone set them separately for each metric.
alejoe91
approved these changes
Dec 2, 2026
Member
|
Thanks @grahamfindlay ! |
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 follows from discussion with @chrishalcrow in #4927
SortingAnalyzersandWaveformExtractorfolders saved before 0.104 listnn_isolationandnn_noise_overlapas metric names. Nowadays these metrics are merged intonn_advanced(which always computes both isolation and noise overlap, whereas previously it was possible that only 1 had been computed). So converting aWaveformExtractorfolder saved before 0.104 raises aValueError, and merging units on an analyzer saved before 0.104 fails.This maps the names (
nn_isolationandnn_noise_overlaptonn_advanced) on load (as is already done forisolation_distanceandl_ratio).If both legacy metrics were computed,
nn_advancedtakesnn_isolation's parameters, otherwise it takes the parameters of whichever legacy metric was used.If both were computed with different parameters,
nn_noise_overlap's parameters are lost, and a warning is raised. Unfortunately there is no way around losing one set, becausenn_advancedhas a single set of parameters for both metrics. Thenn_noise_overlapvalues already stored are unchanged, but the parameters recorded for them are nownn_isolation's, andnn_noise_overlapvalues recomputed later (e.g. for units created by a merge) usenn_isolation's parameters. This should be rare. The two legacy metrics had the same default parameters in every release that had them, so they will differ only if someone set them separately for each metric, which I think would be rather odd.