Skip to content

Commit aea7a77

Browse files
committed
fix: verify if CI breaks due to ProcessPool
1 parent 75a6704 commit aea7a77

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

snazzy_processing/snazzy_processing/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from concurrent.futures import ProcessPoolExecutor, as_completed
1+
from concurrent.futures import ThreadPoolExecutor, as_completed
22
from datetime import datetime
33
import shutil
44

@@ -27,7 +27,7 @@ def measure_vnc_length(embs_src, res_dir, downsampling, threshold_method="multio
2727
lengths = []
2828
ids = []
2929

30-
with ProcessPoolExecutor() as executor:
30+
with ThreadPoolExecutor() as executor:
3131
futures = [
3232
executor.submit(calculate_length, emb, downsampling, threshold_method)
3333
for emb in embs
@@ -109,7 +109,7 @@ def calc_activities(embs_src, res_dir, window):
109109
# NOTE: number of workers is limited here because it was crashing jupyter
110110
# on a machine with low RAM. More workers will result in faster processing
111111
# but also more RAM usage
112-
with ProcessPoolExecutor(max_workers=4) as executor:
112+
with ThreadPoolExecutor(max_workers=4) as executor:
113113
futures = [
114114
executor.submit(calc_activity, act, stct, window)
115115
for act, stct in zip(active, struct)

snazzy_processing/snazzy_processing/vnc_length.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ def get_length_from_csv(file_path, columns=(1,)):
5050

5151

5252
def get_output_data(length_data, downsampling, frame_interval):
53+
length_data = np.array(length_data)
5354
t = length_data.size
5455
time = np.arange(t) * frame_interval * downsampling
5556

0 commit comments

Comments
 (0)