You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from multiprocessing import Process
from multiprocessing.pool import Pool
classSafeProcess(Process):
""" Process that will cleanup before exit """defrun(self, *args, **kw):
result=super().run(*args, **kw)
# cleanup however you want herereturnresultclassSafePool(Pool):
Process=SafeProcess
When running a large batch of optimizations in parrallel, the memory usage gradually increases over time.
(Ubuntu, 6.7k cells, i7-8700K, 12 processes)
context manager with close() does not seem to help.
https://stackoverflow.com/questions/18414020/memory-usage-keep-growing-with-pythons-multiprocessing-pool
https://chase-seibert.github.io/blog/2013/08/03/diagnosing-memory-leaks-python.html
The text was updated successfully, but these errors were encountered: