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
Currently Annif performs parallel processing using the multiprocessing module for some functionality, for example parallel evaluation and preparing the training data for the NN ensemble. This relies (implicitly) on the fork model, which is the default on Linux, and has some nice benefits: models only need to be loaded once, and most of the memory can be shared between worker processes.
However, the fork mode is not available on Windows. On Mac OS, spawn is the default since Python 3.8 because there are problems with the fork mode. In practice, the parallel processing functionality will not work on Mac OS or Windows (unless Annif is run in a Docker container or a Linux VM). See for example this report on annif-users.
We could support the spawn mode as well (and possibly forkserver, although it's not available on Windows). This would be less efficient than fork, since each worker needs to load models separately and they will all require more memory. But it could still be useful on machines with many CPU cores and lots of RAM available.
The text was updated successfully, but these errors were encountered:
Currently Annif performs parallel processing using the multiprocessing module for some functionality, for example parallel evaluation and preparing the training data for the NN ensemble. This relies (implicitly) on the
fork
model, which is the default on Linux, and has some nice benefits: models only need to be loaded once, and most of the memory can be shared between worker processes.However, the
fork
mode is not available on Windows. On Mac OS,spawn
is the default since Python 3.8 because there are problems with thefork
mode. In practice, the parallel processing functionality will not work on Mac OS or Windows (unless Annif is run in a Docker container or a Linux VM). See for example this report on annif-users.We could support the
spawn
mode as well (and possiblyforkserver
, although it's not available on Windows). This would be less efficient thanfork
, since each worker needs to load models separately and they will all require more memory. But it could still be useful on machines with many CPU cores and lots of RAM available.The text was updated successfully, but these errors were encountered: