manuel-calzolari / sklearn-genetic

Genetic feature selection module for scikit-learn
https://sklearn-genetic.readthedocs.io
GNU Lesser General Public License v3.0
324 stars 77 forks source link

Adding pool.close and pool.join calls to ensure processes are properly closed. #1

Closed jmoore52 closed 6 years ago

jmoore52 commented 6 years ago

Processes aren't properly closed after the algorithm runs. When running multiple GA executions in a loop, the OS will eventually hit the limit for number of processes. No Bueno.

This quick fix works and explicitly closes processes after the algorithm has run.

Adding pool.close and pool.join calls to ensure processes are properly closed.

manuel-calzolari commented 6 years ago

Can you add the statement if self.n_jobs != 1:?

Thank you for your contribution.