Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 authored Sep 10, 2024
1 parent 5769eff commit cc21f06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,12 +1349,13 @@ def compute_several_extensions(self, extensions, save=True, verbose=False, **job
)
t_end = perf_counter()
# for pipeline node extensions we can only track the runtime of the run_node_pipeline
runtime_s = np.round(t_end - t_start, 1)
runtime_s = t_end - t_start

for r, result in enumerate(results):
extension_name, variable_name = result_routage[r]
extension_instances[extension_name].data[variable_name] = result
extension_instances[extension_name].run_info["runtime_s"] = runtime_s
extension_instances[extension_name].run_info["run_completed"] = True

for extension_name, extension_instance in extension_instances.items():
self.extensions[extension_name] = extension_instance
Expand Down Expand Up @@ -2008,7 +2009,7 @@ def run(self, save=True, **kwargs):
t_start = perf_counter()
self._run(**kwargs)
t_end = perf_counter()
self.run_info["runtime_s"] = np.round(t_end - t_start, 1)
self.run_info["runtime_s"] = t_end - t_start

if save and not self.sorting_analyzer.is_read_only():
self._save_data(**kwargs)
Expand All @@ -2020,7 +2021,6 @@ def save(self, **kwargs):
self._save_params()
self._save_importing_provenance()
self._save_data(**kwargs)
self.run_info["run_completed"] = True
self._save_run_info()

def _save_data(self, **kwargs):
Expand Down

0 comments on commit cc21f06

Please sign in to comment.