From 8b15be451f90ac4f823e3094537726b579fa4de0 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 16 Feb 2024 11:09:29 +0100 Subject: [PATCH 1/3] Fix singularity issue --- src/spikeinterface/core/baserecordingsnippets.py | 1 + .../sorters/external/tests/test_singularity_containers.py | 2 +- src/spikeinterface/sorters/runsorter.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spikeinterface/core/baserecordingsnippets.py b/src/spikeinterface/core/baserecordingsnippets.py index c2386d0af0..472d63df87 100644 --- a/src/spikeinterface/core/baserecordingsnippets.py +++ b/src/spikeinterface/core/baserecordingsnippets.py @@ -323,6 +323,7 @@ def set_channel_locations(self, locations, channel_ids=None): if self.get_property("contact_vector") is not None: raise ValueError("set_channel_locations(..) destroy the probe description, prefer set_probes(..)") self.set_property("location", locations, ids=channel_ids) + self.set_dummy_probe_from_locations(locations) def get_channel_locations(self, channel_ids=None, axes: str = "xy"): if channel_ids is None: diff --git a/src/spikeinterface/sorters/external/tests/test_singularity_containers.py b/src/spikeinterface/sorters/external/tests/test_singularity_containers.py index 6c4d096104..b82fc051d1 100644 --- a/src/spikeinterface/sorters/external/tests/test_singularity_containers.py +++ b/src/spikeinterface/sorters/external/tests/test_singularity_containers.py @@ -120,4 +120,4 @@ def test_klusta(run_kwargs): if __name__ == "__main__": kwargs = generate_run_kwargs() - test_combinato(kwargs) + test_spykingcircus(kwargs) diff --git a/src/spikeinterface/sorters/runsorter.py b/src/spikeinterface/sorters/runsorter.py index 78ce4886cf..d633f24989 100644 --- a/src/spikeinterface/sorters/runsorter.py +++ b/src/spikeinterface/sorters/runsorter.py @@ -576,7 +576,7 @@ def run_sorter_container( os.remove(parent_folder / "in_container_params.json") os.remove(parent_folder / "in_container_sorter_script.py") if mode == "singularity": - shutil.rmtree(py_user_base_folder) + shutil.rmtree(py_user_base_folder, ignore_errors=True) # check error output_folder = Path(output_folder) From 7313a1274346fb0bcce5f325ac61b158428be957 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 16 Feb 2024 12:03:53 +0100 Subject: [PATCH 2/3] Update src/spikeinterface/core/baserecordingsnippets.py --- src/spikeinterface/core/baserecordingsnippets.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/spikeinterface/core/baserecordingsnippets.py b/src/spikeinterface/core/baserecordingsnippets.py index 472d63df87..c2386d0af0 100644 --- a/src/spikeinterface/core/baserecordingsnippets.py +++ b/src/spikeinterface/core/baserecordingsnippets.py @@ -323,7 +323,6 @@ def set_channel_locations(self, locations, channel_ids=None): if self.get_property("contact_vector") is not None: raise ValueError("set_channel_locations(..) destroy the probe description, prefer set_probes(..)") self.set_property("location", locations, ids=channel_ids) - self.set_dummy_probe_from_locations(locations) def get_channel_locations(self, channel_ids=None, axes: str = "xy"): if channel_ids is None: From ebcf11fc0aebcaa7cd1b455577953a0336144688 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Fri, 16 Feb 2024 12:04:17 +0100 Subject: [PATCH 3/3] Update src/spikeinterface/sorters/external/tests/test_singularity_containers.py --- .../sorters/external/tests/test_singularity_containers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spikeinterface/sorters/external/tests/test_singularity_containers.py b/src/spikeinterface/sorters/external/tests/test_singularity_containers.py index b82fc051d1..6c4d096104 100644 --- a/src/spikeinterface/sorters/external/tests/test_singularity_containers.py +++ b/src/spikeinterface/sorters/external/tests/test_singularity_containers.py @@ -120,4 +120,4 @@ def test_klusta(run_kwargs): if __name__ == "__main__": kwargs = generate_run_kwargs() - test_spykingcircus(kwargs) + test_combinato(kwargs)