spikeinterface
spikeinterface copied to clipboard
Only load `template_metrics` extension on compute if keeping some metrics
Might fix #3471 (Could you try this out please @jonpedros)
When template_metrics
is computed and delete_existing_metrics = False
, any old metrics which aren't being recomputed are kept. To do this, the _run
method loads the old template metric extension (if it exists). However, if this is the first time it has run, it has already created the extension folder. In this case _run
sees the newly-created folder and tries to load it. Bu there's not much in it, so a no run_info
warning appears.
To avoid this, this PR only loads the extension folder if there are metrics to be kept.
I think the previous implementation of load_run_info
was sending two warnings if a run_info
file didn't exist. I think I've made the logic a bit simpler. Could one of the run_info
experts take a look please (@jonahpearl @alejoe91 ) - thanks!