From 955ca7267dc49218914b6aa30491a53927144bbb Mon Sep 17 00:00:00 2001 From: chrishalcrow <57948917+chrishalcrow@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:36:34 +0000 Subject: [PATCH] lil bugs for backwards compat --- src/spikeinterface/curation/model_based_curation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spikeinterface/curation/model_based_curation.py b/src/spikeinterface/curation/model_based_curation.py index ee153956e4..a8e9420e2c 100644 --- a/src/spikeinterface/curation/model_based_curation.py +++ b/src/spikeinterface/curation/model_based_curation.py @@ -5,6 +5,7 @@ from spikeinterface.core import SortingAnalyzer from spikeinterface.curation.train_manual_curation import try_to_get_metrics_from_analyzer, _get_computed_metrics +from copy import deepcopy class ModelBasedClassification: @@ -435,7 +436,7 @@ def handle_backwards_compatibility_metric_params(model_info): if (tm_params := model_info["metric_params"]["template_metric_params"].get("metrics_kwargs")) is not None: metric_params = {} for metric_name in model_info["metric_params"]["template_metric_params"].get("metric_names"): - metric_params[metric_name] = deepcopy(metrics_kwargs) + metric_params[metric_name] = deepcopy(tm_params) model_info["metric_params"]["template_metric_params"]["metric_params"] = metric_params del model_info["metric_params"]["template_metric_params"]["metrics_kwargs"]