Readded the try except block to shifted_correlation.
This commit is contained in:
parent
a1d0cee510
commit
8146a9b270
@ -192,13 +192,22 @@ def shifted_correlation(
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
pool = ProcessPool(nodes=nodes)
|
pool = ProcessPool(nodes=nodes)
|
||||||
result = np.array(
|
try:
|
||||||
pool.map(partial(get_correlation, idx=idx, selector=selector), start_frames)
|
result = np.array(
|
||||||
)
|
pool.map(
|
||||||
pool.terminate()
|
partial(get_correlation, idx=idx, selector=selector), start_frames
|
||||||
pool.restart()
|
)
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
logger.warning(
|
||||||
|
"WARNING: Something went wrong during multiprocessing "
|
||||||
|
"in shifted_correlation."
|
||||||
|
)
|
||||||
|
finally:
|
||||||
|
pool.terminate()
|
||||||
|
pool.restart()
|
||||||
|
|
||||||
if average == True:
|
if average:
|
||||||
clean_result = []
|
clean_result = []
|
||||||
for entry in result:
|
for entry in result:
|
||||||
if np.all(entry == 0):
|
if np.all(entry == 0):
|
||||||
|
Loading…
Reference in New Issue
Block a user