[aggregator] On task per child in multiprocess (to free memory)

This commit is contained in:
Noe Brucy
2021-06-14 18:54:30 +02:00
parent 634d2916a6
commit 4b83de26bf
+1 -1
View File
@@ -47,7 +47,7 @@ class Aggregator:
_map_aux, func, self.path, self.path_out, self.pp_params, **kwargs _map_aux, func, self.path, self.path_out, self.pp_params, **kwargs
) )
pool = MyPool(processes=num_process) pool = MyPool(processes=num_process, maxtasksperchild=1)
result = pool.map(map_fn, run_num) result = pool.map(map_fn, run_num)
pool.close() pool.close()
pool.join() pool.join()